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)
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)
def test_should_intercept_silk_request(self): request = Request() request.path = reverse('silk:summary') should_intercept = _should_intercept(request) self.assertFalse(should_intercept)
def test_should_intercept_non_silk_request(self): request = Request() request.path = '/myapp/foo' should_intercept = _should_intercept(request) self.assertTrue(should_intercept)
def test_should_intercept_without_silk_urls(self): request = Request() request.path = '/login' _should_intercept(request) # Just checking no crash