コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
 def test_unknown_origin(self):
     checker = OriginAuthentication()
     with assert_raises(PermissionDenied):
         client_auth = checker.check_origin_permission('http://toyota.com', self.dataset)
コード例 #4
0
 def test_unknown_origin(self):
     checker = OriginAuthentication()
     with assert_raises(PermissionDenied):
         client_auth = checker.check_origin_permission('http://toyota.com', self.dataset)