Adjust flake8 ...
... to not complain about implementation details when testing.
This commit is contained in:
parent
776112d609
commit
992d2bb7d4
4 changed files with 7 additions and 5 deletions
|
@ -161,6 +161,8 @@ per-file-ignores =
|
|||
WPS430,
|
||||
# Numbers are normal in test cases as expected results.
|
||||
WPS432,
|
||||
# When testing, it is normal to use implementation details.
|
||||
WPS437,
|
||||
tests/db/fake_data/__init__.py:
|
||||
# Top-level of a sub-packages is intended to import a lot.
|
||||
F401,WPS201,
|
||||
|
|
|
@ -317,7 +317,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
obj.delivery_at = None
|
||||
obj.delivery_at_corrected = None
|
||||
obj.delivery_not_confirmed = None
|
||||
obj._courier_waited_at_delivery = None # noqa:WPS437
|
||||
obj._courier_waited_at_delivery = None
|
||||
|
||||
|
||||
class ScheduledOrderFactory(AdHocOrderFactory):
|
||||
|
|
|
@ -110,7 +110,7 @@ class TestProperties:
|
|||
|
||||
def test_is_primary(self, address):
|
||||
"""Test `Address.is_primary` property."""
|
||||
assert address.id == address._primary_id # noqa:WPS437
|
||||
assert address.id == address._primary_id
|
||||
|
||||
result = address.is_primary
|
||||
|
||||
|
@ -118,7 +118,7 @@ class TestProperties:
|
|||
|
||||
def test_is_not_primary(self, address):
|
||||
"""Test `Address.is_primary` property."""
|
||||
address._primary_id = 999 # noqa:WPS437
|
||||
address._primary_id = 999
|
||||
|
||||
result = address.is_primary
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ class TestProperties:
|
|||
|
||||
def test_courier_waited_at_delviery(self, order):
|
||||
"""Test `Order.courier_waited_at_delivery` property."""
|
||||
order._courier_waited_at_delivery = True # noqa:WPS437
|
||||
order._courier_waited_at_delivery = True
|
||||
|
||||
result = order.courier_waited_at_delivery.total_seconds()
|
||||
|
||||
|
@ -344,7 +344,7 @@ class TestProperties:
|
|||
|
||||
def test_courier_did_not_wait_at_delivery(self, order):
|
||||
"""Test `Order.courier_waited_at_delivery` property."""
|
||||
order._courier_waited_at_delivery = False # noqa:WPS437
|
||||
order._courier_waited_at_delivery = False
|
||||
|
||||
result = order.courier_waited_at_delivery.total_seconds()
|
||||
|
||||
|
|
Loading…
Reference in a new issue