mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-11-21 07:38:03 +01:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
6575f6bcf1
commit
4e3abbdc3d
2 changed files with 5 additions and 7 deletions
|
@ -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