Tests: more fixtures.
Common methods from applications/proto.py converted to the fixtures. sysctl check moved to the specific file where it is using. Some options moved to the constructor to have early access.
This commit is contained in:
@@ -37,14 +37,11 @@ class TestRewrite(TestApplicationProto):
|
||||
'routes',
|
||||
)
|
||||
|
||||
def test_rewrite(self):
|
||||
def test_rewrite(self, findall, wait_for_record):
|
||||
assert self.get()['status'] == 200
|
||||
assert (
|
||||
self.wait_for_record(rf'\[notice\].*"routes/1" selected')
|
||||
is not None
|
||||
)
|
||||
assert len(self.findall(rf'\[notice\].*URI rewritten to "/new"')) == 1
|
||||
assert len(self.findall(rf'\[notice\].*URI rewritten')) == 1
|
||||
assert wait_for_record(rf'\[notice\].*"routes/1" selected') is not None
|
||||
assert len(findall(rf'\[notice\].*URI rewritten to "/new"')) == 1
|
||||
assert len(findall(rf'\[notice\].*URI rewritten')) == 1
|
||||
|
||||
self.set_rewrite("", "")
|
||||
assert self.get()['status'] == 200
|
||||
|
||||
Reference in New Issue
Block a user