Commit Graph

15 Commits

Author SHA1 Message Date
Andrei Zeliankou
c183bd8749 Tests: get rid of classes in test files.
Class usage came from the unittest framework and it was always redundant
after migration to the pytest.  This commit removes classes from files
containing tests to make them more readable and understandable.
2023-06-14 18:20:09 +01:00
Andrei Zeliankou
ce2405ec3d Tests: prerequisites checking reworked.
Prerequisites check moved to the module level to simplify class structure.
Discovery and prerequisites checks functions moved to the separate files.
Introduced "require" fixture to provide per-test requirements check.
2023-06-12 14:16:59 +01:00
Andrei Zeliankou
18fcc07c77 Tests: unified setup method usage.
To make fixtures accessible inside of setup methods in tests all these methods
are renamed to the "setup_method_fixture" and decorated by autouse flag.

Also all setup methods moved to the top of the files.
2023-05-25 16:56:14 +01:00
Andrei Zeliankou
3e4fa1e202 Tests: removed unused variables. 2023-05-25 14:26:12 +01:00
Andrei Zeliankou
7934dcabbc Tests: switched to using f-strings.
Previously, it was necessary to support older versions of Python for
compatibility.  F-strings were released in Python 3.6.  Python 3.5 was
marked as unsupported by the end of 2020, so now it's possible to start
using f-strings safely for better readability and performance.
2023-02-21 17:21:29 +00:00
Alejandro Colomar
c60f678485 Tests: Added tests for empty "location". 2022-05-16 12:57:37 +02:00
Alejandro Colomar
d929fbe1a4 Tests: Added tests for variables in "location". 2022-04-28 20:40:01 +02:00
Alejandro Colomar
6d017dfbe4 Tests: Changed tests to accept variables in "location". 2022-04-28 20:40:01 +02:00
Andrei Zeliankou
54837759f3 Tests: fixed unit.log print. 2020-10-19 22:25:29 +01:00
Andrei Zeliankou
d5e9159340 Tests: migrated to the pytest. 2020-09-16 21:31:15 +01:00
Andrei Zeliankou
ce4a2bbd05 Tests: style. 2020-05-15 04:20:56 +01:00
Andrei Zeliankou
2bb8b3d88a Tests: minor fixes. 2020-04-03 01:03:26 +01:00
Andrei Zeliankou
5954839773 Tests: added tests for rational numbers in upstream server weight. 2020-03-30 18:44:50 +01:00
Andrei Zeliankou
f94e31b294 Tests: added tests for "location" option. 2020-03-27 17:29:45 +00:00
Andrei Zeliankou
6e5b5d2a0b Tests: added tests for "return" action. 2020-03-27 15:50:09 +00:00