Skip to content

Commit

Permalink
Bump the tests-dependencies group with 2 updates (#435)
Browse files Browse the repository at this point in the history
Bumps the tests-dependencies group with 2 updates:
[pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) and
[pytest](https://github.com/pytest-dev/pytest).

Updates `pytest-asyncio` from 0.21.1 to 0.23.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's
releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.23.6</h2>
<h1>0.23.6 (2024-03-19)</h1>
<ul>
<li>Fix compatibility with pytest 8.2 <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/pull/800">#800</a></li>
</ul>
<h2>Known issues</h2>
<p>As of v0.23, pytest-asyncio attaches an asyncio event loop to each
item of the test suite (i.e. session, packages, modules, classes,
functions) and allows tests to be run in those loops when marked
accordingly. Pytest-asyncio currently assumes that async fixture scope
is correlated with the new event loop scope. This prevents fixtures from
being evaluated independently from the event loop scope and breaks some
existing test suites (see <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/706">#706</a>).
For example, a test suite may require all fixtures and tests to run in
the same event loop, but have async fixtures that are set up and torn
down for each module. If you're affected by this issue, please continue
using the v0.21 release, until it is resolved.</p>
<h2>pytest-asyncio 0.23.5.post1</h2>
<h1>0.23.5 (2024-02-09)</h1>
<ul>
<li>Declare compatibility with pytest 8 <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/737">#737</a></li>
<li>Fix typing errors with recent versions of mypy <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/769">#769</a></li>
<li>Prevent DeprecationWarning about internal use of
<code>asyncio.get_event_loop()</code> from affecting test cases <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/757">#757</a></li>
</ul>
<h2>Known issues</h2>
<p>As of v0.23, pytest-asyncio attaches an asyncio event loop to each
item of the test suite (i.e. session, packages, modules, classes,
functions) and allows tests to be run in those loops when marked
accordingly. Pytest-asyncio currently assumes that async fixture scope
is correlated with the new event loop scope. This prevents fixtures from
being evaluated independently from the event loop scope and breaks some
existing test suites (see <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/706">#706</a>).
For example, a test suite may require all fixtures and tests to run in
the same event loop, but have async fixtures that are set up and torn
down for each module. If you're affected by this issue, please continue
using the v0.21 release, until it is resolved.</p>
<h2>pytest-asyncio 0.23.5</h2>
<h1>0.23.5 (2024-02-09)</h1>
<ul>
<li>Declare compatibility with pytest 8 <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/737">#737</a></li>
<li>Fix typing errors with recent versions of mypy <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/769">#769</a></li>
<li>Prevent DeprecationWarning about internal use of
<code>asyncio.get_event_loop()</code> from affecting test cases <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/757">#757</a></li>
</ul>
<h2>Known issues</h2>
<p>As of v0.23, pytest-asyncio attaches an asyncio event loop to each
item of the test suite (i.e. session, packages, modules, classes,
functions) and allows tests to be run in those loops when marked
accordingly. Pytest-asyncio currently assumes that async fixture scope
is correlated with the new event loop scope. This prevents fixtures from
being evaluated independently from the event loop scope and breaks some
existing test suites (see <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/706">#706</a>).
For example, a test suite may require all fixtures and tests to run in
the same event loop, but have async fixtures that are set up and torn
down for each module. If you're affected by this issue, please continue
using the v0.21 release, until it is resolved.</p>
<h2>pytest-asyncio 0.23.5a0</h2>
<h1>0.23.5 (UNRELEASED)</h1>
<ul>
<li>Declare compatibility with pytest 8 <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/737">#737</a></li>
<li>Fix typing errors with recent versions of mypy <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/769">#769</a></li>
</ul>
<h2>Known issues</h2>
<p>As of v0.23, pytest-asyncio attaches an asyncio event loop to each
item of the test suite (i.e. session, packages, modules, classes,
functions) and allows tests to be run in those loops when marked
accordingly. Pytest-asyncio currently assumes that async fixture scope
is correlated with the new event loop scope. This prevents fixtures from
being evaluated independently from the event loop scope and breaks some
existing test suites (see <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/706">#706</a>).
For example, a test suite may require all fixtures and tests to run in
the same event loop, but have async fixtures that are set up and torn
down for each module. If you're affected by this issue, please continue
using the v0.21 release, until it is resolved.</p>
<h2>pytest-asyncio 0.23.4</h2>
<h1>0.23.4 (2024-01-28)</h1>
<ul>
<li>pytest-asyncio no longer imports additional, unrelated packages
during test collection <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/729">#729</a></li>
<li>Addresses further issues that caused an internal pytest error during
test collection</li>
<li>Declares incompatibility with pytest 8 <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/737">#737</a></li>
</ul>
<h2>pytest-asyncio 0.23.4a2</h2>
<h1>0.23.4 (UNRELEASED)</h1>
<ul>
<li>pytest-asyncio no longer imports additional, unrelated packages
during test collection <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/729">#729</a></li>
<li>Addresses further issues that caused an internal pytest error during
test collection</li>
</ul>
<h2>Known issues</h2>
<p>As of v0.23, pytest-asyncio attaches an asyncio event loop to each
item of the test suite (i.e. session, packages, modules, classes,
functions) and allows tests to be run in those loops when marked
accordingly. Pytest-asyncio currently assumes that async fixture scope
is correlated with the new event loop scope. This prevents fixtures from
being evaluated independently from the event loop scope and breaks some
existing test suites (see <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/706">#706</a>).
For example, a test suite may require all fixtures and tests to run in
the same event loop, but have async fixtures that are set up and torn
down for each module. If you're affected by this issue, please continue
using the v0.21 release, until it is resolved.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/c34da04b82153ce052109bad31ccdbc0be7938e1"><code>c34da04</code></a>
[docs] Mentioned pytest 8.2 compatibility fix in changelog.</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/143f745d279afc070cf5cf6144fbf34d960fae72"><code>143f745</code></a>
Fix compatibility with pytest 8.2 FixtureDef.unittest removal</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/13d4b79f7ff0d9d0ea70880b3276f85dea7f1f15"><code>13d4b79</code></a>
Remove unused function <code>_removesuffix</code></li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/cdd2c4906835b6f627d681fbee5d487554884e5f"><code>cdd2c49</code></a>
Use <code>FixtureRequest</code> instead of <code>SubRequest</code></li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/c3429fa4d72239be9b428342f0f1407e0840b9ec"><code>c3429fa</code></a>
Build(deps): Bump packaging from 23.2 to 24.0 in /dependencies/docs</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/5f2338dfc9f9b5ac2c27d3bef490fa3e2cd7c156"><code>5f2338d</code></a>
Build(deps): Bump pypa/gh-action-pypi-publish from 1.8.12 to 1.8.14</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/726c6e0f3c185f10d8a842bcd1d781de32a3b2f5"><code>726c6e0</code></a>
Build(deps): Bump coverage from 7.4.3 to 7.4.4 in
/dependencies/default</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/8bd8288709717165b352c7f2f207c8e4ef624a01"><code>8bd8288</code></a>
Build(deps): Bump pytest from 8.0.2 to 8.1.1 in
/dependencies/default</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/ef3b3477070d6a270e1bb2c1d438c64dba42724c"><code>ef3b347</code></a>
Build(deps): Bump packaging from 23.2 to 24.0 in
/dependencies/default</li>
<li><a
href="https://github.com/pytest-dev/pytest-asyncio/commit/b22d84e1f0d53920352be4c66d1b6c7f7a9ce005"><code>b22d84e</code></a>
[docs] Fixes the example showing how to run all tests in a
session-scoped loop.</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.21.1...v0.23.6">compare
view</a></li>
</ul>
</details>
<br />

Updates `pytest` from 8.0.2 to 8.2.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest/releases">pytest's
releases</a>.</em></p>
<blockquote>
<h2>8.2.0</h2>
<h1>pytest 8.2.0 (2024-04-27)</h1>
<h2>Deprecations</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/12069">#12069</a>:
A deprecation warning is now raised when implementations of one of the
following hooks request a deprecated <code>py.path.local</code>
parameter instead of the <code>pathlib.Path</code> parameter which
replaced it:</p>
<ul>
<li><code>pytest_ignore_collect</code>{.interpreted-text
role=&quot;hook&quot;} - the <code>path</code> parameter - use
<code>collection_path</code> instead.</li>
<li><code>pytest_collect_file</code>{.interpreted-text
role=&quot;hook&quot;} - the <code>path</code> parameter - use
<code>file_path</code> instead.</li>
<li><code>pytest_pycollect_makemodule</code>{.interpreted-text
role=&quot;hook&quot;} - the <code>path</code> parameter - use
<code>module_path</code> instead.</li>
<li><code>pytest_report_header</code>{.interpreted-text
role=&quot;hook&quot;} - the <code>startdir</code> parameter - use
<code>start_path</code> instead.</li>
<li><code>pytest_report_collectionfinish</code>{.interpreted-text
role=&quot;hook&quot;} - the <code>startdir</code> parameter - use
<code>start_path</code> instead.</li>
</ul>
<p>The replacement parameters are available since pytest 7.0.0.
The old parameters will be removed in pytest 9.0.0.</p>
<p>See <code>legacy-path-hooks-deprecated</code>{.interpreted-text
role=&quot;ref&quot;} for more details.</p>
</li>
</ul>
<h2>Features</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11871">#11871</a>:
Added support for reading command line arguments from a file using the
prefix character <code>@</code>, like e.g.: <code>pytest
@tests.txt</code>. The file must have one argument per line.</p>
<p>See <code>Read arguments from file
&lt;args-from-file&gt;</code>{.interpreted-text role=&quot;ref&quot;}
for details.</p>
</li>
</ul>
<h2>Improvements</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11523">#11523</a>:
<code>pytest.importorskip</code>{.interpreted-text
role=&quot;func&quot;} will now issue a warning if the module could be
found, but raised <code>ImportError</code>{.interpreted-text
role=&quot;class&quot;} instead of
<code>ModuleNotFoundError</code>{.interpreted-text
role=&quot;class&quot;}.</p>
<p>The warning can be suppressed by passing
<code>exc_type=ImportError</code> to
<code>pytest.importorskip</code>{.interpreted-text
role=&quot;func&quot;}.</p>
<p>See <code>import-or-skip-import-error</code>{.interpreted-text
role=&quot;ref&quot;} for details.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11728">#11728</a>:
For <code>unittest</code>-based tests, exceptions during class cleanup
(as raised by functions registered with <code>TestCase.addClassCleanup
&lt;unittest.TestCase.addClassCleanup&gt;</code>{.interpreted-text
role=&quot;meth&quot;}) are now reported instead of silently
failing.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11777">#11777</a>:
Text is no longer truncated in the <code>short test summary info</code>
section when <code>-vv</code> is given.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/12112">#12112</a>:
Improved namespace packages detection when
<code>consider_namespace_packages</code>{.interpreted-text
role=&quot;confval&quot;} is enabled, covering more situations (like
editable installs).</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/9502">#9502</a>:
Added <code>PYTEST_VERSION</code>{.interpreted-text
role=&quot;envvar&quot;} environment variable which is defined at the
start of the pytest session and undefined afterwards. It contains the
value of <code>pytest.__version__</code>, and among other things can be
used to easily check if code is running from within a pytest run.</p>
</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/12065">#12065</a>:
Fixed a regression in pytest 8.0.0 where test classes containing
<code>setup_method</code> and tests using <code>@staticmethod</code> or
<code>@classmethod</code> would crash with <code>AttributeError:
'NoneType' object has no attribute 'setup_method'</code>.</p>
<p>Now the <code>request.instance
&lt;pytest.FixtureRequest.instance&gt;</code>{.interpreted-text
role=&quot;attr&quot;} attribute of tests using
<code>@staticmethod</code> and <code>@classmethod</code> is no longer
<code>None</code>, but a fresh instance of the class, like in non-static
methods.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest/commit/6bd3f313447290380cbc2db30fb9ee5cca7eb941"><code>6bd3f31</code></a>
Tweak changelog for 8.2.0</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/9b6219b5e89af237e5bc80354d405d2b5c2fc8a0"><code>9b6219b</code></a>
Prepare release version 8.2.0</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/835765c9d31e0a86c6028f983b28d32c82a759c4"><code>835765c</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/12130">#12130</a>
from bluetech/fixtures-inline</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/7e7503c0b015f61d9d21d3b5f55990b7fcd683f7"><code>7e7503c</code></a>
unittest: report class cleanup exceptions (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/12250">#12250</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/882c4da2f37702b00bdbd3b6c74e9821d33e0204"><code>882c4da</code></a>
fixtures: inline <code>fail_fixturefunc</code></li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/2e8fb9f1401d727e20f004326752fd1922f9c601"><code>2e8fb9f</code></a>
fixtures: extract a <code>_check_fixturedef</code> method</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/acf2971f46a9518b3552d48ea9541a1951c2b207"><code>acf2971</code></a>
fixtures: inline <code>_getnextfixturedef</code> into
<code>_get_active_fixturedef</code></li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/3c77aec1dac0894ec4ca774b71ec91c85cf91dd1"><code>3c77aec</code></a>
fixtures: move &quot;request&quot; check early</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/d217d68cde0c34d619862f15c773ecc02ecdaabe"><code>d217d68</code></a>
fixtures: inline <code>_compute_fixture_value</code></li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/530be285751143febe54b8974b234eed5eb8b079"><code>530be28</code></a>
fixtures: use early return in <code>_get_active_fixturedef</code></li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest/compare/8.0.2...8.2.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: armanddidierjean <95971503+armanddidierjean@users.noreply.github.com>
Co-authored-by: julien4215 <120588494+julien4215@users.noreply.github.com>
  • Loading branch information
3 people authored May 18, 2024
1 parent 535ddfd commit 05a210b
Show file tree
Hide file tree
Showing 20 changed files with 2 additions and 58 deletions.
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ httpx==0.27.0 # needed for tests as a replacement of reque
mypy==1.10.0
psycopg[binary]==3.1.19 # PostgreSQL adapter for synchronous operations at startup (database initializations & migrations), binary installation is the easiest way to install it
pytest-alembic==0.11.0
pytest-asyncio==0.21.1
pytest-asyncio==0.23.6
pytest-cov==5.0.0
pytest-mock==3.14.0
pytest==8.0.2
pytest==8.2.0
ruff==0.4.4
types-aiofiles==23.2.0.20240403
types-redis==4.6.0.20240425
Expand Down
16 changes: 0 additions & 16 deletions tests/commons.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import asyncio
import logging
import uuid
from collections.abc import AsyncGenerator
from functools import lru_cache

import pytest
import redis
from fastapi import Depends
from fastapi.testclient import TestClient
Expand Down Expand Up @@ -104,20 +102,6 @@ def change_redis_client_status(activated: bool):
pass


# We need to redefine the event_loop (which is function scoped by default)
# to be able to use session scoped fixture (the function that initialize the db objects in each test file)
# See https://github.com/tortoise/tortoise-orm/issues/638#issuecomment-830124562
@pytest.fixture(scope="module")
def event_loop():
"""Overrides pytest default function scoped event loop"""
policy = asyncio.get_event_loop_policy()
loop = policy.new_event_loop()
try:
yield loop
finally:
loop.close()


async def create_user_with_groups(
groups: list[GroupType],
user_id: str | None = None,
Expand Down
1 change: 0 additions & 1 deletion tests/test_PH.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

ph_user_ph: models_core.CoreUser
Expand Down
1 change: 0 additions & 1 deletion tests/test_advert.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

advert: models_advert.Advert | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_amap.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
from app.core.groups.groups_type import GroupType
from app.modules.amap import models_amap
from app.modules.amap.types_amap import AmapSlotType, DeliveryStatusType

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
change_redis_client_status,
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

amap_user: models_core.CoreUser | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@

from app.core import models_core
from app.types.floors_type import FloorsType

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
client,
event_loop, # noqa
)

user: models_core.CoreUser
Expand Down
3 changes: 0 additions & 3 deletions tests/test_booking.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
from app.core import models_core
from app.core.groups.groups_type import GroupType
from app.modules.booking import models_booking

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

booking: models_booking.Booking | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
from app.core.groups.groups_type import GroupType
from app.modules.booking.types_booking import Decision
from app.modules.calendar import models_calendar

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

calendar_event: models_calendar.Event | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
from app.core.groups.groups_type import GroupType
from app.modules.campaign import models_campaign
from app.modules.campaign.types_campaign import ListType

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

CAA_user: models_core.CoreUser | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_cinema.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
from app.core import models_core
from app.core.groups.groups_type import GroupType
from app.modules.cinema import models_cinema

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

session: models_cinema.Session | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

from app.core import models_core
from app.core.groups.groups_type import GroupType

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

simple_user: models_core.CoreUser | None = None
Expand Down
1 change: 0 additions & 1 deletion tests/test_flappybird.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

flappybird_score: models_flappybird.FlappyBirdScore | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

from app.core import models_core
from app.core.groups.groups_type import GroupType

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

admin_user: models_core.CoreUser | None = None
Expand Down
1 change: 0 additions & 1 deletion tests/test_loan.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

admin_user: models_core.CoreUser | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

from app.core import models_core
from app.core.groups.groups_type import GroupType

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

admin_user: models_core.CoreUser | None = None
Expand Down
1 change: 0 additions & 1 deletion tests/test_phonebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

association: models_phonebook.Association | None = None
Expand Down
3 changes: 0 additions & 3 deletions tests/test_raffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
from app.core.groups.groups_type import GroupType
from app.modules.raffle import models_raffle
from app.modules.raffle.types_raffle import RaffleStatusType

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
add_object_to_db,
change_redis_client_status,
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

BDE_user: models_core.CoreUser | None = None
Expand Down
1 change: 0 additions & 1 deletion tests/test_recommendation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)


Expand Down
3 changes: 0 additions & 3 deletions tests/test_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@

from app.core import models_core
from app.core.groups.groups_type import GroupType

# We need to import event_loop for pytest-asyncio routine defined bellow
from tests.commons import (
client,
create_api_access_token,
create_user_with_groups,
event_loop, # noqa
)

admin_user: models_core.CoreUser
Expand Down
1 change: 0 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from tests.commons import (
TestingSessionLocal,
add_object_to_db,
event_loop, # noqa
)


Expand Down

0 comments on commit 05a210b

Please sign in to comment.