-
Notifications
You must be signed in to change notification settings - Fork 8
/
regression_testing.py
81 lines (63 loc) · 2.72 KB
/
regression_testing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import os
from typing import AsyncGenerator
from app.models.tenants import CreateTenantRequest, CreateTenantResponse
from app.tests.util.tenants import TENANT_BASE_PATH, delete_tenant, post_tenant_request
from shared.util.rich_async_client import RichAsyncClient
class RegressionTestConfig:
group_id_prefix = "RegressionTests"
reused_connection_alias = "RegressionTestConnection"
run_regression_tests = os.getenv("RUN_REGRESSION_TESTS", "false").upper() == "TRUE"
fail_on_recreating_fixtures = (
os.getenv("FAIL_ON_RECREATING_FIXTURES", "false").upper() == "TRUE"
)
delete_fixtures_after_run = (
os.getenv("DELETE_REGRESSION_FIXTURES", "false").upper() == "TRUE"
)
class TestMode:
clean_run = "clean"
regression_run = "reuse"
fixture_params = (
[regression_run] if RegressionTestConfig.run_regression_tests else [clean_run]
)
def assert_fail_on_recreating_fixtures():