示例#1
0
 def test_user_profile(self):
     """A user should be able to see another users public profile."""
     user = create_user()
     response = self.client.get(reverse('userprofile_public', args=(user.username,)))
     self.assertContains(response, user.username)
示例#2
0
 def test_suggested_quests(self):
     """A user should be presented with quest suggestions."""
     master = create_user()
     quest = create_quest(owner=master, title='suggested_quest_0')
     response = self.client.get(reverse('home'))
     self.assertContains(response, quest.title)
示例#3
0
 def setUp(self):
     """Start with logged in user"""
     self.client = Client()
     self.user = create_user()
     self.logged_in = self.client.login(**self.user.credentials)