예제 #1
0
 def test_without_context_user_is_None(self):
     api = ExposedAPI()
     self.assertIs(api.user, None)
예제 #2
0
 def test_user_returns_context_user(self):
     user = MockUser(True, True)
     context = CallContext(user, None, None)
     api = ExposedAPI(context)
     self.assertIs(api.user, context.user)
예제 #3
0
 def test_context_defaults_to_None(self):
     api = ExposedAPI()
     self.assertIs(api._context, None)