Browse Source

Change basket quantity error message in tests as well.

master
Joey Jurjens 2 years ago
parent
commit
72e60e9f95
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      tests/functional/test_basket.py
  2. 1
    1
      tests/integration/basket/test_forms.py

+ 1
- 1
tests/functional/test_basket.py View File

515
         self.assertEqual(response.status_code, 200)
515
         self.assertEqual(response.status_code, 200)
516
         self.assertFalse(response.context['formset'].forms[0].is_valid())
516
         self.assertFalse(response.context['formset'].forms[0].is_valid())
517
         self.assertIn(
517
         self.assertIn(
518
-            "can be bought which has been exceeded because you have multiple lines of the same product.",
518
+            "Available stock is only %s, which has been exceeded because multiple lines contain the same product." % 2,
519
             str(response.context['formset'].forms[0].errors)
519
             str(response.context['formset'].forms[0].errors)
520
         )
520
         )

+ 1
- 1
tests/integration/basket/test_forms.py View File

154
         )
154
         )
155
         self.assertFalse(form.is_valid())
155
         self.assertFalse(form.is_valid())
156
         self.assertIn(
156
         self.assertIn(
157
-            "can be bought which has been exceeded because you have multiple lines of the same product.",
157
+            "Available stock is only %s, which has been exceeded because multiple lines contain the same product." % 2,
158
             str(form.errors)
158
             str(form.errors)
159
         )
159
         )
160
 
160
 

Loading…
Cancel
Save