pytest-databases 0.7.2__tar.gz → 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/PKG-INFO +1 -1
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/pyproject.toml +1 -1
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.oracle.yml +2 -2
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/oracle.py +21 -21
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_oracle.py +15 -15
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/.gitignore +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/.pre-commit-config.yaml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/.sourcery.yaml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/.vscode/launch.json +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/.vscode/settings.json +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/CODEOWNERS +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/CONTRIBUTING.rst +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/LICENSE +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/Makefile +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/README.md +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/scripts/__init__.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/scripts/build_docs.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/scripts/convert_docs.sh +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/scripts/install-hatch.sh +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/sonar-project.properties +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/__init__.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/__metadata__.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/__init__.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/alloydb_omni.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/azure_blob.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/bigquery.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/cockroachdb.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.alloydb-omni.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.azurite.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.bigquery.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.cockroachdb.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.dragonfly.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.elasticsearch.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.keydb.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.mariadb.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.mssql.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.mysql.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.postgres.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.redis.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.spanner.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.valkey.yml +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/dragonfly.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/elastic_search.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/keydb.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/mariadb.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/mssql.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/mysql.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/postgres.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/redis.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/spanner.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/valkey.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/helpers.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/py.typed +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/__init__.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/conftest.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/__init__.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_alloydb_omni.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_azure_blob.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_bigquery.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_cockroachdb.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_dragonfly.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_elasticsearch.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_keydb.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_mariadb.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_mssql.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_mysql.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_postgres.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_redis.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_spanner.py +0 -0
- {pytest_databases-0.7.2 → pytest_databases-0.8.0}/tests/docker/test_valkey.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pytest-databases
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Reusable database fixtures for any and all databases.
|
|
5
5
|
Project-URL: Documentation, https://github.com/litestar-org/pytest-databases#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/litestar-org/pytest-databases/issues
|
|
@@ -9,12 +9,12 @@ services:
|
|
|
9
9
|
ORACLE_PASSWORD: ${ORACLE_SYSTEM_PASSWORD:-super-secret}
|
|
10
10
|
APP_USER_PASSWORD: ${ORACLE_PASSWORD:-super-secret}
|
|
11
11
|
APP_USER: ${ORACLE_USER:-app}
|
|
12
|
-
|
|
12
|
+
oracle23ai:
|
|
13
13
|
networks:
|
|
14
14
|
- default
|
|
15
15
|
image: gvenzl/oracle-free:23-slim-faststart
|
|
16
16
|
ports:
|
|
17
|
-
- "${
|
|
17
|
+
- "${ORACLE23AI_PORT:-1513}:1521" # use a non-standard port here
|
|
18
18
|
environment:
|
|
19
19
|
ORACLE_PASSWORD: ${ORACLE_SYSTEM_PASSWORD:-super-secret}
|
|
20
20
|
APP_USER_PASSWORD: ${ORACLE_PASSWORD:-super-secret}
|
|
@@ -75,13 +75,13 @@ def oracle18c_service_name() -> str:
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
@pytest.fixture(scope="session")
|
|
78
|
-
def
|
|
78
|
+
def oracle23ai_service_name() -> str:
|
|
79
79
|
return "FREEPDB1"
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
@pytest.fixture(scope="session")
|
|
83
|
-
def oracle_service_name(
|
|
84
|
-
return
|
|
83
|
+
def oracle_service_name(oracle23ai_service_name: str) -> str:
|
|
84
|
+
return oracle23ai_service_name
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
@pytest.fixture(scope="session")
|
|
@@ -90,18 +90,18 @@ def oracle18c_port() -> int:
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
@pytest.fixture(scope="session")
|
|
93
|
-
def
|
|
93
|
+
def oracle23ai_port() -> int:
|
|
94
94
|
return 1513
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
@pytest.fixture(scope="session")
|
|
98
98
|
def default_oracle_service_name() -> str:
|
|
99
|
-
return "
|
|
99
|
+
return "oracle23ai"
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
@pytest.fixture(scope="session")
|
|
103
|
-
def oracle_port(
|
|
104
|
-
return
|
|
103
|
+
def oracle_port(oracle23ai_port: int) -> int:
|
|
104
|
+
return oracle23ai_port
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
@pytest.fixture(scope="session")
|
|
@@ -115,11 +115,11 @@ def oracle_docker_ip(oracle_docker_services: DockerServiceRegistry) -> str:
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
@pytest.fixture(autouse=False, scope="session")
|
|
118
|
-
async def
|
|
118
|
+
async def oracle23ai_service(
|
|
119
119
|
oracle_docker_services: DockerServiceRegistry,
|
|
120
120
|
oracle_docker_compose_files: list[Path],
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
oracle23ai_port: int,
|
|
122
|
+
oracle23ai_service_name: str,
|
|
123
123
|
oracle_system_password: str,
|
|
124
124
|
oracle_user: str,
|
|
125
125
|
oracle_password: str,
|
|
@@ -127,16 +127,16 @@ async def oracle23c_service(
|
|
|
127
127
|
os.environ["ORACLE_PASSWORD"] = oracle_password
|
|
128
128
|
os.environ["ORACLE_SYSTEM_PASSWORD"] = oracle_system_password
|
|
129
129
|
os.environ["ORACLE_USER"] = oracle_user
|
|
130
|
-
os.environ["
|
|
131
|
-
os.environ["
|
|
130
|
+
os.environ["ORACLE23AI_SERVICE_NAME"] = oracle23ai_service_name
|
|
131
|
+
os.environ["ORACLE23AI_PORT"] = str(oracle23ai_port)
|
|
132
132
|
await oracle_docker_services.start(
|
|
133
|
-
"
|
|
133
|
+
"oracle23ai",
|
|
134
134
|
docker_compose_files=oracle_docker_compose_files,
|
|
135
135
|
timeout=90,
|
|
136
136
|
pause=1,
|
|
137
137
|
check=oracle_responsive,
|
|
138
|
-
port=
|
|
139
|
-
service_name=
|
|
138
|
+
port=oracle23ai_port,
|
|
139
|
+
service_name=oracle23ai_service_name,
|
|
140
140
|
user=oracle_user,
|
|
141
141
|
password=oracle_password,
|
|
142
142
|
)
|
|
@@ -242,19 +242,19 @@ async def oracle18c_startup_connection(
|
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
@pytest.fixture(autouse=False, scope="session")
|
|
245
|
-
async def
|
|
246
|
-
|
|
245
|
+
async def oracle23ai_startup_connection(
|
|
246
|
+
oracle23ai_service: DockerServiceRegistry,
|
|
247
247
|
oracle_docker_ip: str,
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
oracle23ai_port: int,
|
|
249
|
+
oracle23ai_service_name: str,
|
|
250
250
|
oracle_user: str,
|
|
251
251
|
oracle_password: str,
|
|
252
252
|
) -> AsyncGenerator[oracledb.AsyncConnection, None]:
|
|
253
253
|
async with oracledb.connect_async(
|
|
254
254
|
host=oracle_docker_ip,
|
|
255
|
-
port=
|
|
255
|
+
port=oracle23ai_port,
|
|
256
256
|
user=oracle_user,
|
|
257
|
-
service_name=
|
|
257
|
+
service_name=oracle23ai_service_name,
|
|
258
258
|
password=oracle_password,
|
|
259
259
|
) as db_connection:
|
|
260
260
|
yield db_connection
|
|
@@ -23,13 +23,13 @@ def test_oracle18c_default_config(
|
|
|
23
23
|
assert oracle18c_port == 1514
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
def
|
|
27
|
-
oracle_user: str, oracle_password: str,
|
|
26
|
+
def test_oracle23ai_default_config(
|
|
27
|
+
oracle_user: str, oracle_password: str, oracle23ai_service_name: str, oracle23ai_port: int
|
|
28
28
|
) -> None:
|
|
29
29
|
assert oracle_user == "app"
|
|
30
30
|
assert oracle_password == "super-secret"
|
|
31
|
-
assert
|
|
32
|
-
assert
|
|
31
|
+
assert oracle23ai_service_name == "FREEPDB1"
|
|
32
|
+
assert oracle23ai_port == 1513
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def test_oracle_default_config(
|
|
@@ -37,15 +37,15 @@ def test_oracle_default_config(
|
|
|
37
37
|
oracle_password: str,
|
|
38
38
|
oracle_service_name: str,
|
|
39
39
|
oracle_port: int,
|
|
40
|
-
|
|
40
|
+
oracle23ai_port: int,
|
|
41
41
|
default_oracle_service_name: str,
|
|
42
42
|
) -> None:
|
|
43
|
-
assert default_oracle_service_name == "
|
|
43
|
+
assert default_oracle_service_name == "oracle23ai"
|
|
44
44
|
assert oracle_user == "app"
|
|
45
45
|
assert oracle_password == "super-secret"
|
|
46
46
|
assert oracle_service_name == "FREEPDB1"
|
|
47
47
|
assert oracle_port == 1513
|
|
48
|
-
assert oracle_port ==
|
|
48
|
+
assert oracle_port == oracle23ai_port
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
async def test_oracle18c_service(
|
|
@@ -67,18 +67,18 @@ async def test_oracle18c_service(
|
|
|
67
67
|
assert "Hello World!" in res
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
async def
|
|
70
|
+
async def test_oracle23ai_service(
|
|
71
71
|
oracle_docker_ip: str,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
oracle23ai_service: DockerServiceRegistry,
|
|
73
|
+
oracle23ai_service_name: str,
|
|
74
|
+
oracle23ai_port: int,
|
|
75
75
|
oracle_user: str,
|
|
76
76
|
oracle_password: str,
|
|
77
77
|
) -> None:
|
|
78
78
|
conn = oracledb.connect(
|
|
79
79
|
user=oracle_user,
|
|
80
80
|
password=oracle_password,
|
|
81
|
-
dsn=f"{oracle_docker_ip}:{
|
|
81
|
+
dsn=f"{oracle_docker_ip}:{oracle23ai_port!s}/{oracle23ai_service_name}",
|
|
82
82
|
)
|
|
83
83
|
with conn.cursor() as cur:
|
|
84
84
|
cur.execute("SELECT 'Hello World!' FROM dual")
|
|
@@ -106,10 +106,10 @@ async def test_oracle18c_services_after_start(
|
|
|
106
106
|
assert bool(result is not None and result[0][0] == 1)
|
|
107
107
|
|
|
108
108
|
|
|
109
|
-
async def
|
|
110
|
-
|
|
109
|
+
async def test_oracle23ai_services_after_start(
|
|
110
|
+
oracle23ai_startup_connection: oracledb.AsyncConnection,
|
|
111
111
|
) -> None:
|
|
112
|
-
async with
|
|
112
|
+
async with oracle23ai_startup_connection.cursor() as cursor:
|
|
113
113
|
await cursor.execute("CREATE or replace view simple_table as SELECT 1 as the_value from dual")
|
|
114
114
|
await cursor.execute("select * from simple_table")
|
|
115
115
|
result = await cursor.fetchall()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/alloydb_omni.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/cockroachdb.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_databases-0.7.2 → pytest_databases-0.8.0}/src/pytest_databases/docker/elastic_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|