mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-11-25 01:28:02 +01:00
Compare commits
3 commits
ec29d95b8e
...
4e3abbdc3d
Author | SHA1 | Date | |
---|---|---|---|
|
4e3abbdc3d | ||
|
6575f6bcf1 | ||
|
a3cb768094 |
6 changed files with 14 additions and 16 deletions
|
@ -40,7 +40,7 @@ repos:
|
|||
hooks:
|
||||
- id: djhtml
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.5.7
|
||||
rev: v0.6.1
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
|
|
|
@ -56,9 +56,9 @@ idna==3.7
|
|||
# via requests
|
||||
kiwisolver==1.4.5
|
||||
# via matplotlib
|
||||
matplotlib==3.9.1.post1
|
||||
matplotlib==3.9.2
|
||||
# via -r requirements.in
|
||||
numpy==2.0.1
|
||||
numpy==2.1.0
|
||||
# via
|
||||
# contourpy
|
||||
# matplotlib
|
||||
|
|
|
@ -39,7 +39,7 @@ django==5.1
|
|||
# via
|
||||
# -c constraints.txt
|
||||
# model-bakery
|
||||
factory-boy==3.3.0
|
||||
factory-boy==3.3.1
|
||||
# via -r requirements-dev.in
|
||||
faker==27.0.0
|
||||
# via factory-boy
|
||||
|
@ -62,7 +62,7 @@ jinja2==3.1.4
|
|||
# via pytest-html
|
||||
markupsafe==2.1.5
|
||||
# via jinja2
|
||||
model-bakery==1.19.1
|
||||
model-bakery==1.19.3
|
||||
# via -r requirements-dev.in
|
||||
mypy-extensions==1.0.0
|
||||
# via black
|
||||
|
@ -133,7 +133,7 @@ requests==2.32.3
|
|||
# -c constraints.txt
|
||||
# pytest-base-url
|
||||
# pytest-selenium
|
||||
ruff==0.5.7
|
||||
ruff==0.6.1
|
||||
# via -r requirements-dev.in
|
||||
selenium==4.23.1
|
||||
# via
|
||||
|
@ -178,5 +178,5 @@ wsproto==1.2.0
|
|||
# The following packages are considered to be unsafe in a requirements file:
|
||||
pip==24.2
|
||||
# via pip-tools
|
||||
setuptools==72.1.0
|
||||
setuptools==72.2.0
|
||||
# via pip-tools
|
||||
|
|
|
@ -56,9 +56,9 @@ idna==3.7
|
|||
# via requests
|
||||
kiwisolver==1.4.5
|
||||
# via matplotlib
|
||||
matplotlib==3.9.1.post1
|
||||
matplotlib==3.9.2
|
||||
# via -r requirements.in
|
||||
numpy==2.0.1
|
||||
numpy==2.1.0
|
||||
# via
|
||||
# contourpy
|
||||
# matplotlib
|
||||
|
|
|
@ -7,7 +7,7 @@ def _collectstatic():
|
|||
call_command("collectstatic", interactive=False, verbosity=0)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@pytest.fixture
|
||||
def live_server(settings, live_server):
|
||||
settings.STORAGES = {
|
||||
"default": {
|
||||
|
@ -20,13 +20,13 @@ def live_server(settings, live_server):
|
|||
return live_server
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@pytest.fixture
|
||||
def firefox_options(firefox_options):
|
||||
firefox_options.add_argument("-headless")
|
||||
return firefox_options
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@pytest.fixture
|
||||
def selenium(selenium):
|
||||
selenium.implicitly_wait(3)
|
||||
selenium.set_window_size(3860, 2140)
|
||||
|
|
|
@ -40,10 +40,8 @@ class Command(BaseCommand):
|
|||
method = random.choices(payment_methods, weights=methods_weights)[0]
|
||||
basket = Basket.objects.create(payment_method=method)
|
||||
items_in_basket = int(random.normalvariate(3, 2))
|
||||
if items_in_basket > len(products):
|
||||
items_in_basket = len(products)
|
||||
if items_in_basket < 1:
|
||||
items_in_basket = 1
|
||||
items_in_basket = min(items_in_basket, len(products))
|
||||
items_in_basket = max(items_in_basket, 1)
|
||||
rng = np.random.default_rng()
|
||||
selected_products = rng.choice(
|
||||
products,
|
||||
|
|
Loading…
Reference in a new issue