Skip to content

Commit

Permalink
chore(deps): update dependency pytest to v8 (#3141)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency pytest to v8

* fix: tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: maxmind test

* fix: maxmind test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Anas <muhammad.anas@arbisoft.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 12, 2024
1 parent 433b112 commit be25c27
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 24 deletions.
1 change: 0 additions & 1 deletion ecommerce/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@

FAKE = faker.Factory.create()
pytestmark = pytest.mark.django_db
lazy = pytest.lazy_fixture

CYBERSOURCE_ACCESS_KEY = "access"
CYBERSOURCE_PROFILE_ID = "profile"
Expand Down
2 changes: 0 additions & 2 deletions ecommerce/mail_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
from mitxpro.utils import format_price
from users.factories import UserFactory

lazy = pytest.lazy_fixture

pytestmark = pytest.mark.django_db


Expand Down
2 changes: 1 addition & 1 deletion ecommerce/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pytest
from django.db.models import Count, Q
from django.urls import reverse
from pytest_lazy_fixtures import lf as lazy
from rest_framework import status
from rest_framework.renderers import JSONRenderer
from rest_framework.test import APIClient
Expand Down Expand Up @@ -70,7 +71,6 @@
CYBERSOURCE_SECURITY_KEY = "security"
FAKE = faker.Factory.create()

lazy = pytest.lazy_fixture

pytestmark = pytest.mark.django_db

Expand Down
2 changes: 1 addition & 1 deletion mail/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from email.utils import formataddr

import pytest
from pytest_lazy_fixtures import lf as lazy

from mail.api import (
EmailMetadata,
Expand All @@ -20,7 +21,6 @@
from users.factories import UserFactory

pytestmark = [pytest.mark.django_db, pytest.mark.usefixtures("email_settings")]
lazy = pytest.lazy_fixture


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion maxmind/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ def test_ipv4_lookup(v4, in_block):

result = ip_to_country_code(str(test_address))

return result is None and not in_block
assert (result is not None and in_block) or result is None
28 changes: 14 additions & 14 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ hypothesis = "4.24.6"
ipdb = "*"
nplusone = ">=0.8.1"
pdbpp = "*"
pytest = "^7.4.4"
pytest = "^8.0.0"
pytest-cov = ">=2.6.1"
pytest-django = "*"
pytest-env = "*"
pytest-lazy-fixture = "0.6.3"
pytest-lazy-fixtures = "*"
pytest-mock = "*"
responses = "*"
ruff = "^0.6.0"
Expand Down
3 changes: 1 addition & 2 deletions sheets/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
import pytest
from django.test.client import Client, RequestFactory
from django.urls import reverse
from pytest_lazy_fixtures import lf as lazy
from rest_framework import status

from mitxpro.test_utils import set_request_session
from sheets.factories import GoogleApiAuthFactory, GoogleFileWatchFactory
from sheets.models import GoogleApiAuth
from sheets.views import complete_google_auth

lazy = pytest.lazy_fixture


@pytest.fixture
def google_api_auth(user):
Expand Down

0 comments on commit be25c27

Please sign in to comment.