示例#1
0
def test_vat_prefix_for_country():
    prefix, result = verify_vat("12345678", get_vat_prefix_for_country("fi"))
    assert prefix == "FI"
    assert result == ('12345678',)
示例#2
0
def test_vat_invalid(input, expected_code):
    with pytest.raises(ValidationError) as excinfo:
        verify_vat(input)
    assert excinfo.value.code == expected_code
示例#3
0
def test_vat_autoprefix():
    prefix, result = verify_vat("12345678", "FI")
    assert prefix == "FI"
    assert result == ('12345678',)
示例#4
0
def test_vat_valid(input, expected):
    prefix, result = verify_vat(input)
    assert result == expected, ("%s works" % input)
示例#5
0
文件: test_vat.py 项目: ruqaiya/shuup
def test_vat_prefix_for_country():
    prefix, result = verify_vat("12345678", get_vat_prefix_for_country("fi"))
    assert prefix == "FI"
    assert result == ('12345678',)
示例#6
0
文件: test_vat.py 项目: ruqaiya/shuup
def test_vat_autoprefix():
    prefix, result = verify_vat("12345678", "FI")
    assert prefix == "FI"
    assert result == ('12345678',)
示例#7
0
文件: test_vat.py 项目: ruqaiya/shuup
def test_vat_invalid(input, expected_code):
    with pytest.raises(ValidationError) as excinfo:
        verify_vat(input)
    assert excinfo.value.code == expected_code
示例#8
0
文件: test_vat.py 项目: ruqaiya/shuup
def test_vat_valid(input, expected):
    prefix, result = verify_vat(input)
    assert result == expected, ("%s works" % input)