add m2_price_excl_vat to all price resources

This commit is contained in:
Martin
2016-12-12 12:08:00 +01:00
parent ef9c86bfdd
commit 5ad053a09b
3 changed files with 32 additions and 12 deletions
+10 -2
View File
@@ -54,6 +54,7 @@ class TestEndpoints(flask_testing.TestCase):
expected = [
{
'm2_price': 295.0,
'm2_price_excl_vat': 236.0,
'price_excl_vat': 236.0,
'price': 295.0,
'material': 'standard-wallpaper',
@@ -61,6 +62,7 @@ class TestEndpoints(flask_testing.TestCase):
},
{
'm2_price': 325.0,
'm2_price_excl_vat': 260.0,
'price_excl_vat': 260.0,
'price': 325.0,
'material': 'premium-wallpaper',
@@ -82,6 +84,7 @@ class TestEndpoints(flask_testing.TestCase):
'price_excl_vat': 981.76,
'material_id': 1,
'm2_price': 306.8,
'm2_price_excl_vat': 245.44,
'material': 'standard-wallpaper'
},
{
@@ -89,6 +92,7 @@ class TestEndpoints(flask_testing.TestCase):
'price_excl_vat': 1081.6000000000001,
'material_id': 2,
'm2_price': 338.00000000000006,
'm2_price_excl_vat': 270.40000000000003,
'material': 'premium-wallpaper'
}
]
@@ -106,7 +110,8 @@ class TestEndpoints(flask_testing.TestCase):
'width': 150,
'height': 40,
'framed': True,
'm2_price': 999.0
'm2_price': 999.0,
'm2_price_excl_vat': 799.2,
},
{
'price_excl_vat': 319.68000000000006,
@@ -114,7 +119,8 @@ class TestEndpoints(flask_testing.TestCase):
'width': 200,
'height': 20,
'framed': False,
'm2_price': 999.0
'm2_price': 999.0,
'm2_price_excl_vat': 799.2,
}
]
self.assertEqual(expected, response.json['data'])
@@ -133,6 +139,7 @@ class TestEndpoints(flask_testing.TestCase):
'price': 1236.9099140000003,
'framed': True,
'm2_price': 1038.96,
'm2_price_excl_vat': 831.1680000000001,
'width': 150
},
{
@@ -141,6 +148,7 @@ class TestEndpoints(flask_testing.TestCase):
'price': 415.58400000000006,
'framed': False,
'm2_price': 1038.96,
'm2_price_excl_vat': 831.1680000000001,
'width': 200
}
]