瀏覽代碼

Change basket quantity error message in tests as well.

master
Joey Jurjens 2 年之前
父節點
當前提交
72e60e9f95
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      tests/functional/test_basket.py
  2. 1
    1
      tests/integration/basket/test_forms.py

+ 1
- 1
tests/functional/test_basket.py 查看文件

@@ -515,6 +515,6 @@ class BasketFormSetTests(WebTestCase):
515 515
         self.assertEqual(response.status_code, 200)
516 516
         self.assertFalse(response.context['formset'].forms[0].is_valid())
517 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 519
             str(response.context['formset'].forms[0].errors)
520 520
         )

+ 1
- 1
tests/integration/basket/test_forms.py 查看文件

@@ -154,7 +154,7 @@ class TestBasketLineForm(TestCase):
154 154
         )
155 155
         self.assertFalse(form.is_valid())
156 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 158
             str(form.errors)
159 159
         )
160 160
 

Loading…
取消
儲存