Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improved project tests

  • Loading branch information...
commit 3ce1516ff194240963e8126f44c2b3a0d424b126 1 parent e87df05
James Tauber jtauber authored
2  pinax/projects/temp_group_project/apps/newprojects/tests/__init__.py
View
@@ -40,7 +40,6 @@ def test_auth_create_post(self):
self.assertEqual(response.status_code, 302)
self.assertEqual(response["location"], "http://testserver/newprojects/project/test/")
self.assertEqual(Project.objects.get(slug="test").creator.username, "tester")
- self.assertEqual(Project.objects.get(slug="test").members.all()[0].username, "tester")
def test_auth_creator_membership(self):
"""is membership for creator correct?"""
@@ -54,5 +53,6 @@ def test_auth_creator_membership(self):
})
response = self.client.get("/newprojects/project/test/")
self.assertEqual(Project.objects.get(slug="test").creator.username, "tester")
+ self.assertEqual(len(Project.objects.get(slug="test").members.all()), 1)
self.assertEqual(Project.objects.get(slug="test").members.all()[0].username, "tester")
self.assertEqual(response.context[0]["is_member"], True)
Please sign in to comment.
Something went wrong with that request. Please try again.