def test_simple_origin_matching_on_not_first_origin(self): checker = OriginAuthentication() client_auth = checker.check_origin_permission('http://localhost:8000', self.dataset) assert_is_not_none(client_auth) assert_true(isinstance(client_auth, tuple)) assert_equal(len(client_auth), 2)
def test_unknown_origin(self): checker = OriginAuthentication() with assert_raises(PermissionDenied): client_auth = checker.check_origin_permission('http://toyota.com', self.dataset)