Repository: fractal-analytics-platform/fractal-client (language: python)

Issue:
`test_task_edit` should use the `clear_task_cache` fixture
And in general this hold for all tests where we address tasks by name and/or version rather than ID.


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 435abc729..07ca4621e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,7 +27,7 @@
     * Make `sqlmodel` a development depedency (\#493).
     * Improve handling of a `ConnectError` in the CI (\#502).
     * Remove arbitrary `kwargs` from internal functions (\#503).
-
+    * Align with latest fractal-server version and update tests (\#517).
 
 # 1.2.0
 
diff --git a/poetry.lock b/poetry.lock
index 443354ce3..5a75a4f56 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.5.0 and should not be changed by hand.
 
 [[package]]
 name = "aiosqlite"
@@ -600,7 +600,7 @@ sqlalchemy = ["fastapi-users-db-sqlalchemy (>=4.0.0)"]
 
 [[package]]
 name = "fractal-server"
-version = "1.3.0a5"
+version = "1.3.0a9"
 description = "Server component of the Fractal analytics platform"
 optional = false
 python-versions = "^3.9"
@@ -629,7 +629,7 @@ slurm = ["cloudpickle (>=2.2.1,<2.3.0)", "clusterfutures (>=0.5,<0.6)"]
 type = "git"
 url = "https://github.com/fractal-analytics-platform/fractal-server.git"
 reference = "main"
-resolved_reference = "24d125868091a0e5271d479254f8527346d98ad1"
+resolved_reference = "dc35e25f2672bd9a9b8cf2f0c2100116ae239b99"
 
 [[package]]
 name = "greenlet"
@@ -1087,7 +1087,7 @@ name = "pycparser"
 version = "2.21"
 description = "C parser in Python"
 optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+python-versions = "*"
 files = [
     {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"},
     {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"},
@@ -1639,30 +1639,6 @@ files = [
     {file = "SQLAlchemy-1.4.41.tar.gz", hash = "sha256:0292f70d1797e3c54e862e6f30ae474014648bc9c723e14a2fda730adb0a9791"},
 ]
 
-[package.dependencies]
-greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and (platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\")"}
-
-[package.extras]
-aiomysql = ["aiomysql", "greenlet (!=0.4.17)"]
-aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing-extensions (!=3.10.0.1)"]
-asyncio = ["greenlet (!=0.4.17)"]
-asyncmy = ["asyncmy (>=0.2.3,!=0.2.4)", "greenlet (!=0.4.17)"]
-mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2)"]
-mssql = ["pyodbc"]
-mssql-pymssql = ["pymssql"]
-mssql-pyodbc = ["pyodbc"]
-mypy = ["mypy (>=0.910)", "sqlalchemy2-stubs"]
-mysql = ["mysqlclient (>=1.4.0)", "mysqlclient (>=1.4.0,<2)"]
-mysql-connector = ["mysql-connector-python"]
-oracle = ["cx-oracle (>=7)", "cx-oracle (>=7,<8)"]
-postgresql = ["psycopg2 (>=2.7)"]
-postgresql-asyncpg = ["asyncpg", "greenlet (!=0.4.17)"]
-postgresql-pg8000 = ["pg8000 (>=1.16.6,!=1.29.0)"]
-postgresql-psycopg2binary = ["psycopg2-binary"]
-postgresql-psycopg2cffi = ["psycopg2cffi"]
-pymysql = ["pymysql", "pymysql (<1)"]
-sqlcipher = ["sqlcipher3-binary"]
-
 [[package]]
 name = "sqlalchemy-utils"
 version = "0.38.3"


Test patch:
diff --git a/tests/test_task.py b/tests/test_task.py
index 381f838e6..bf3001cd4 100644
--- a/tests/test_task.py
+++ b/tests/test_task.py
@@ -184,6 +184,7 @@ async def test_task_edit(
     invoke_as_superuser,
     tmp_path,
     testdata_path: Path,
+    clear_task_cache,
 ):
     schema_path = str(tmp_path / "schema.json")
     schema = dict(key1=1, key2=[2, "3"])
@@ -315,7 +316,7 @@ async def test_task_edit(
 
 
 async def test_task_delete(
-    register_user, user_factory, invoke, invoke_as_superuser
+    register_user, user_factory, invoke, invoke_as_superuser, clear_task_cache,
 ):
     """
     Test task delete
diff --git a/tests/test_workflow.py b/tests/test_workflow.py
index 2619f36cf..2a7a06ad9 100644
--- a/tests/test_workflow.py
+++ b/tests/test_workflow.py
@@ -136,6 +136,7 @@ async def test_workflow_add_task(
     task_factory,
     workflow_factory,
     tmp_path: Path,
+    clear_task_cache,
 ):
     """
     GIVEN a workflow