Пример #1
0
def test_price_string_with_decimal_restriction_does_not_find_invalid_prices(price):
    price_string_validator = re.compile(price_string(False, True)['pattern'])
    assert re.search(price_string_validator, price) is None
Пример #2
0
def test_price_string_empty():
    price_string_validator = re.compile(price_string(True)['pattern'])
    m = re.search(price_string_validator, '')
    assert m is not None
Пример #3
0
def test_price_string_finds_valid_prices(price):
    price_string_validator = re.compile(price_string(False)['pattern'])
    assert re.search(price_string_validator, price) is not None