From e5ef9723dc5fb17b31f38a410cfcfd28f604a0d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 05:16:40 +0000 Subject: [PATCH 1/2] Bump pytest-mysql from 2.5.0 to 3.0.0 Bumps [pytest-mysql](https://github.com/ClearcodeHQ/pytest-mysql) from 2.5.0 to 3.0.0. - [Changelog](https://github.com/ClearcodeHQ/pytest-mysql/blob/main/CHANGES.rst) - [Commits](https://github.com/ClearcodeHQ/pytest-mysql/compare/v2.5.0...v3.0.0) --- updated-dependencies: - dependency-name: pytest-mysql dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index b1fede1..b61b410 100644 --- a/Pipfile +++ b/Pipfile @@ -17,7 +17,7 @@ black = "==24.4.0" pytest = "==8.2.0" pytest-cov = "==5.0.0" mock = "==5.1.0" -pytest-mysql = "==2.5.0" +pytest-mysql = "==3.0.0" pytest-postgresql = "==6.0.0" pytest-pyramid = "==1.0.3" tbump = "==6.11.0" From 65487e2c5da6e34e63e3c16808f168eba7166d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=C5=9Aliwi=C5=84ski?= Date: Mon, 3 Jun 2024 12:19:38 +0200 Subject: [PATCH 2/2] Update mysql's connection string for pytest-mysql 3 and it's use of pymysql --- newsfragments/765.misc.rst | 1 + tests/conftest.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 newsfragments/765.misc.rst diff --git a/newsfragments/765.misc.rst b/newsfragments/765.misc.rst new file mode 100644 index 0000000..d044274 --- /dev/null +++ b/newsfragments/765.misc.rst @@ -0,0 +1 @@ +Adjust tests for updated pytest-mysql using pymysql instead of mysqlclient. \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index 551f4d0..41d99c1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,11 +34,12 @@ def db_session(request): """Session for SQLAlchemy.""" from pyramid_fullauth.models import Base # pylint:disable=import-outside-toplevel + connection = "" if request.param == "sqlite": connection = "sqlite:///fullauth.sqlite" elif request.param == "mysql": request.getfixturevalue("mysql") # takes care of creating database - connection = "mysql+mysqldb://root:@127.0.0.1:3307/tests?charset=utf8" + connection = "mysql+pymysql://root:@127.0.0.1:3307/tests?charset=utf8" elif request.param == "postgresql": request.getfixturevalue("postgresql") # takes care of creating database connection = "postgresql+psycopg://postgres:@127.0.0.1:5433/tests"