Tests pour le BDS #816

Open
thubrecht wants to merge 40 commits from thubrecht/bds-tests into master
Showing only changes of commit 2b2fcb8d52 - Show all commits

View file

@ -703,7 +703,7 @@ class AccountStatOperationListViewTests(ViewTestCaseMixin, TestCase):
for stat, expected in zip(content["stats"], expected_stats):
expected_url = expected.pop("url")
self.assertUrlsEqual(stat["url"], expected_url)
self.assertDictContainsSubset(expected, stat)
self.assertEqual(stat, {**stat, **expected})
class AccountStatOperationViewTests(ViewTestCaseMixin, TestCase):
@ -812,7 +812,7 @@ class AccountStatBalanceListViewTests(ViewTestCaseMixin, TestCase):
for stat, expected in zip(content["stats"], expected_stats):
expected_url = expected.pop("url")
self.assertUrlsEqual(stat["url"], expected_url)
self.assertDictContainsSubset(expected, stat)
self.assertEqual(stat, {**stat, **expected})
class AccountStatBalanceViewTests(ViewTestCaseMixin, TestCase):
@ -1647,7 +1647,7 @@ class ArticleStatSalesListViewTests(ViewTestCaseMixin, TestCase):
for stat, expected in zip(content["stats"], expected_stats):
expected_url = expected.pop("url")
self.assertUrlsEqual(stat["url"], expected_url)
self.assertDictContainsSubset(expected, stat)
self.assertEqual(stat, {**stat, **expected})
class ArticleStatSalesViewTests(ViewTestCaseMixin, TestCase):
@ -1716,7 +1716,7 @@ class KPsulCheckoutDataViewTests(ViewTestCaseMixin, TestCase):
expected = {"name": "Checkout", "balance": "10.00"}
self.assertDictContainsSubset(expected, content)
self.assertEqual(content, {**content, **expected})
self.assertSetEqual(
set(content.keys()),
@ -4100,7 +4100,7 @@ class KPsulArticlesData(ViewTestCaseMixin, TestCase):
]
for expected, article in zip(expected_list, articles):
self.assertDictContainsSubset(expected, article)
self.assertEqual(article, {**article, **expected})
self.assertSetEqual(
set(article.keys()),
set(
@ -4200,7 +4200,7 @@ class AccountReadJSONViewTests(ViewTestCaseMixin, TestCase):
content = json.loads(r.content.decode("utf-8"))
expected = {"name": "first last", "trigramme": "000", "balance": "0.00"}
self.assertDictContainsSubset(expected, content)
self.assertEqual(content, {**content, **expected})
self.assertSetEqual(
set(content.keys()),