Compare commits

...

3 commits

Author SHA1 Message Date
pre-commit-ci[bot]
4e3abbdc3d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-08-19 22:54:55 +00:00
pre-commit-ci[bot]
6575f6bcf1 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.7...v0.6.1)
2024-08-19 22:54:55 +00:00
Crocmagnon
a3cb768094 Update dependencies 2024-08-19 18:07:19 +00:00
6 changed files with 14 additions and 16 deletions

View file

@ -40,7 +40,7 @@ repos:
hooks: hooks:
- id: djhtml - id: djhtml
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7 rev: v0.6.1
hooks: hooks:
- id: ruff - id: ruff
args: [--fix] args: [--fix]

View file

@ -56,9 +56,9 @@ idna==3.7
# via requests # via requests
kiwisolver==1.4.5 kiwisolver==1.4.5
# via matplotlib # via matplotlib
matplotlib==3.9.1.post1 matplotlib==3.9.2
# via -r requirements.in # via -r requirements.in
numpy==2.0.1 numpy==2.1.0
# via # via
# contourpy # contourpy
# matplotlib # matplotlib

View file

@ -39,7 +39,7 @@ django==5.1
# via # via
# -c constraints.txt # -c constraints.txt
# model-bakery # model-bakery
factory-boy==3.3.0 factory-boy==3.3.1
# via -r requirements-dev.in # via -r requirements-dev.in
faker==27.0.0 faker==27.0.0
# via factory-boy # via factory-boy
@ -62,7 +62,7 @@ jinja2==3.1.4
# via pytest-html # via pytest-html
markupsafe==2.1.5 markupsafe==2.1.5
# via jinja2 # via jinja2
model-bakery==1.19.1 model-bakery==1.19.3
# via -r requirements-dev.in # via -r requirements-dev.in
mypy-extensions==1.0.0 mypy-extensions==1.0.0
# via black # via black
@ -133,7 +133,7 @@ requests==2.32.3
# -c constraints.txt # -c constraints.txt
# pytest-base-url # pytest-base-url
# pytest-selenium # pytest-selenium
ruff==0.5.7 ruff==0.6.1
# via -r requirements-dev.in # via -r requirements-dev.in
selenium==4.23.1 selenium==4.23.1
# via # via
@ -178,5 +178,5 @@ wsproto==1.2.0
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
pip==24.2 pip==24.2
# via pip-tools # via pip-tools
setuptools==72.1.0 setuptools==72.2.0
# via pip-tools # via pip-tools

View file

@ -56,9 +56,9 @@ idna==3.7
# via requests # via requests
kiwisolver==1.4.5 kiwisolver==1.4.5
# via matplotlib # via matplotlib
matplotlib==3.9.1.post1 matplotlib==3.9.2
# via -r requirements.in # via -r requirements.in
numpy==2.0.1 numpy==2.1.0
# via # via
# contourpy # contourpy
# matplotlib # matplotlib

View file

@ -7,7 +7,7 @@ def _collectstatic():
call_command("collectstatic", interactive=False, verbosity=0) call_command("collectstatic", interactive=False, verbosity=0)
@pytest.fixture() @pytest.fixture
def live_server(settings, live_server): def live_server(settings, live_server):
settings.STORAGES = { settings.STORAGES = {
"default": { "default": {
@ -20,13 +20,13 @@ def live_server(settings, live_server):
return live_server return live_server
@pytest.fixture() @pytest.fixture
def firefox_options(firefox_options): def firefox_options(firefox_options):
firefox_options.add_argument("-headless") firefox_options.add_argument("-headless")
return firefox_options return firefox_options
@pytest.fixture() @pytest.fixture
def selenium(selenium): def selenium(selenium):
selenium.implicitly_wait(3) selenium.implicitly_wait(3)
selenium.set_window_size(3860, 2140) selenium.set_window_size(3860, 2140)

View file

@ -40,10 +40,8 @@ class Command(BaseCommand):
method = random.choices(payment_methods, weights=methods_weights)[0] method = random.choices(payment_methods, weights=methods_weights)[0]
basket = Basket.objects.create(payment_method=method) basket = Basket.objects.create(payment_method=method)
items_in_basket = int(random.normalvariate(3, 2)) items_in_basket = int(random.normalvariate(3, 2))
if items_in_basket > len(products): items_in_basket = min(items_in_basket, len(products))
items_in_basket = len(products) items_in_basket = max(items_in_basket, 1)
if items_in_basket < 1:
items_in_basket = 1
rng = np.random.default_rng() rng = np.random.default_rng()
selected_products = rng.choice( selected_products = rng.choice(
products, products,