from django.test import TestCase
from resources import views
from django.test import Client
from resources.models import Resource
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse

class ResourceTestViews(TestCase):

	def setUp(self): 
		cli = Client()   
		#response = cli.post('/login', {'username': 'inioluwa', 'password': 'codango'})

	def test_ListView(self):
		url = reverse("resources.views.ListView")
		resp = self.client.get(url)
		self.assertEqual(response.status_code, 200)
		self.assertIn(create.title, resp.content)
		

	# def test_ListView(self):
	# 	Resource.objects.create()
	# 	view = ListView.as_view()
	# 	response = view()
	# 	self.assertEqual(response.status_code, 200)
	# 	self.assertIn(create.title, response.content)


	# def test_resources_views():
	# 	# create = self.create_resource()
	# 	url = reverse("resources.views.resources")

	# 	self.assertEqual(resp.status_code, 200)
	# 	self.assertIn(create.title, resp.content)

	# def create_resources(self, title = "Some words", text = "some more words"):
	# 	return Resource.objects.create(title = title, text = text, author = self.client)

	# def test_ListView(self):
	# 	c = self.create_resources()
	# 	url = reverse("resources.views.resources")
	# 	response = self.client.get(url)
	# 	self.assertEqual(response.status_code, 200)
	# 	self.assertIn(c.title, response.content)
@@ -285,19 +285,27 @@
 lf): %0A%09%09
-cli
+self.client
  = Clien
@@ -314,90 +314,8 @@
 )   
-%0A%09%09#response = cli.post('/login', %7B'username': 'inioluwa', 'password': 'codango'%7D)
 %0A%0A%09d
@@ -388,16 +388,20 @@
 )%0A%09%09resp
+onse
  = self.
@@ -495,827 +495,8 @@
 tle,
- resp.content)%0A%09%09%0A%0A%09# def test_ListView(self):%0A%09# %09Resource.objects.create()%0A%09# %09view = ListView.as_view()%0A%09# %09response = view()%0A%09# %09self.assertEqual(response.status_code, 200)%0A%09# %09self.assertIn(create.title, response.content)%0A%0A%0A%09# def test_resources_views():%0A%09# %09# create = self.create_resource()%0A%09# %09url = reverse(%22resources.views.resources%22)%0A%0A%09# %09self.assertEqual(resp.status_code, 200)%0A%09# %09self.assertIn(create.title, resp.content)%0A%0A%09# def create_resources(self, title = %22Some words%22, text = %22some more words%22):%0A%09# %09return Resource.objects.create(title = title, text = text, author = self.client)%0A%0A%09# def test_ListView(self):%0A%09# %09c = self.create_resources()%0A%09# %09url = reverse(%22resources.views.resources%22)%0A%09# %09response = self.client.get(url)%0A%09# %09self.assertEqual(response.status_code, 200)%0A%09# %09self.assertIn(c.title,
  res
@@ -509,8 +509,12 @@
 content)
+%0A%09%09%0A

Update test_views.py