Move revbank test asserts to a test file
This commit is contained in:
parent
334906bbf3
commit
d69f35cfcc
2 changed files with 16 additions and 10 deletions
|
@ -50,16 +50,6 @@ class Product:
|
|||
return f'{aliases:<30} {price:<6} {description:<60} {metadata}'
|
||||
|
||||
|
||||
assert Product.from_line('8711327538481,liuk 0.80 "Ola Liuk" #ah=wi162664 #qty=8') == \
|
||||
Product(['8711327538481','liuk'], Decimal('0.8'), 'Ola Liuk', {'ah': 'wi162664', 'qty': '8'})
|
||||
assert Product.from_line('5000112659184,colazero 1.00 "Cola Zero" #sligro') == \
|
||||
Product(['5000112659184','colazero'], Decimal(1), 'Cola Zero', {'sligro': None})
|
||||
assert Product.from_line('8711327538481,liuk 0.80 "Ola Liuk" #ah=wi162664 #qty=8').format_line() == \
|
||||
'8711327538481,liuk 0.80 "Ola Liuk" #ah=wi162664 #qty=8'
|
||||
assert Product(['5000112659184','colazero'], Decimal(1), 'Cola Zero', {'sligro': None}).format_line() == \
|
||||
'5000112659184,colazero 1.00 "Cola Zero" #sligro'
|
||||
|
||||
|
||||
class NoAutoUpdate(Exception):
|
||||
def __init__(self):
|
||||
super().__init__('no auto update directive')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue