Use Autocomplete instead of Select in Add to List screen
This commit is contained in:
@@ -6,7 +6,12 @@ Copyright (c) 2022 Asymworks, LLC. All Rights Reserved.
|
||||
|
||||
import pytest
|
||||
|
||||
from sigl.domain.service import product_by_id, product_create, products_all
|
||||
from sigl.domain.service import (
|
||||
product_by_id,
|
||||
product_by_name,
|
||||
product_create,
|
||||
products_all,
|
||||
)
|
||||
|
||||
# Always use 'app' fixture so ORM gets initialized
|
||||
pytestmark = pytest.mark.usefixtures('app')
|
||||
@@ -60,3 +65,11 @@ def test_product_all_items_skips_non_remembered(session):
|
||||
assert p1 in products
|
||||
assert p3 in products
|
||||
assert p2 not in products
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_product_lookup_by_name(session):
|
||||
"""Test that a Product can be looked up by Name (case-insensitive)."""
|
||||
p1 = product_create(session, 'Apples')
|
||||
product = product_by_name(session, 'apples')
|
||||
assert product == p1
|
||||
|
||||
Reference in New Issue
Block a user