示例#1
0
 def test_get_context_data(self):
     user = UserF.create(**{'is_superuser': True})
     ProjectF.create_batch(5, add_admins=[user])
     ProjectF.create_batch(5)
     view = ProjectsList()
     context = view.get_context_data()
     self.assertEqual(len(context.get('projects')), 10)
示例#2
0
 def test_get_context_data(self):
     user = UserF.create(**{'is_superuser': True})
     ProjectF.create_batch(5, add_admins=[user])
     ProjectF.create_batch(5)
     view = ProjectsList()
     context = view.get_context_data()
     self.assertEqual(len(context.get('projects')), 10)