diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2022-10-11 13:49:44 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2022-10-11 13:49:44 +0100 |
commit | 08dab702cb4140613e942b86f54824b3c7dea2ad (patch) | |
tree | 53d6005914690007c3b2853ea596544122624c77 /test/test_access_log.py | |
parent | 8e1e0471914b39da0634a23c4231ce98021a4cf7 (diff) | |
download | unit-08dab702cb4140613e942b86f54824b3c7dea2ad.tar.gz unit-08dab702cb4140613e942b86f54824b3c7dea2ad.tar.bz2 |
Tests: reworked "test_variables.py".
Access log used for the variables testing instead of limited routing.
Added missed test for $status variable.
Some tests moved from "test_access_log.py" to "test_variables.py".
Diffstat (limited to 'test/test_access_log.py')
-rw-r--r-- | test/test_access_log.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/test/test_access_log.py b/test/test_access_log.py index b1d89343..a072858b 100644 --- a/test/test_access_log.py +++ b/test/test_access_log.py @@ -280,28 +280,6 @@ Connection: close def test_access_log_variables(self): self.load('mirror') - # $time_local - - self.set_format('$uri $time_local $uri') - assert self.get(url='/time_local')['status'] == 200 - assert self.wait_for_record('/time_local') is not None, 'time log' - date = self.search_in_log( - r'^\/time_local (.*) \/time_local$', 'access.log' - )[1] - assert ( - abs( - self.date_to_sec_epoch(date, '%d/%b/%Y:%X %z') - - time.mktime(time.localtime()) - ) - < 5 - ), '$time_local' - - # $request_line - - self.set_format('$request_line') - assert self.get(url='/r_line')['status'] == 200 - assert self.wait_for_record(r'^GET \/r_line HTTP\/1\.1$') is not None - # $body_bytes_sent self.set_format('$uri $body_bytes_sent') |