Esempio n. 1
0
 def test_handle_public_name(self):
     r = DummyRequest()
     assert handle_public_name(self.student, r) == "student"
     r.COOKIES['ANONYMIZE'] = True
     assert handle_public_name(self.student, r).startswith("User Name_")
Esempio n. 2
0
 def test_handle_public_name(self):
     r = DummyRequest()
     self.assertEqual(handle_public_name(self.student, r), "student")
     r.COOKIES['ANONYMIZE'] = True
     self.assertTrue(
         handle_public_name(self.student, r).startswith("User Name_"))