def test_it(self, uau): uau.return_value = u'bob' self.request.user = '******' rf = user.get_user(self.request) self.assertEqual(rf, 'User.bob')
def test_unauth(self, uau): uau.return_value = None rf = user.get_user(self.request) self.assertIsNone(rf)