コード例 #1
0
ファイル: test_silky_middleware.py プロジェクト: crunchr/silk
    def test_should_intercept_ignore_paths(self):
        SilkyConfig().SILKY_IGNORE_PATHS = ['/ignorethis']
        request = Request()
        request.path = '/ignorethis'
        should_intercept = _should_intercept(request)

        self.assertFalse(should_intercept)
コード例 #2
0
    def test_should_intercept_ignore_paths(self):
        SilkyConfig().SILKY_IGNORE_PATHS = [
            '/ignorethis'
        ]
        request = Request()
        request.path = '/ignorethis'
        should_intercept = _should_intercept(request)

        self.assertFalse(should_intercept)
コード例 #3
0
ファイル: test_silky_middleware.py プロジェクト: crunchr/silk
    def test_should_intercept_silk_request(self):
        request = Request()
        request.path = reverse('silk:summary')
        should_intercept = _should_intercept(request)

        self.assertFalse(should_intercept)
コード例 #4
0
ファイル: test_silky_middleware.py プロジェクト: crunchr/silk
    def test_should_intercept_non_silk_request(self):
        request = Request()
        request.path = '/myapp/foo'
        should_intercept = _should_intercept(request)

        self.assertTrue(should_intercept)
コード例 #5
0
 def test_should_intercept_without_silk_urls(self):
     request = Request()
     request.path = '/login'
     _should_intercept(request)  # Just checking no crash
コード例 #6
0
    def test_should_intercept_non_silk_request(self):
        request = Request()
        request.path = '/myapp/foo'
        should_intercept = _should_intercept(request)

        self.assertTrue(should_intercept)
コード例 #7
0
    def test_should_intercept_silk_request(self):
        request = Request()
        request.path = reverse('silk:summary')
        should_intercept = _should_intercept(request)

        self.assertFalse(should_intercept)