Selaa lähdekoodia

Fix dashboard tests broken in #326 :blush:

master
David Winterbottom 13 vuotta sitten
vanhempi
commit
428644c92c

+ 1
- 0
oscar/templates/oscar/dashboard/catalogue/product_update.html Näytä tiedosto

@@ -107,6 +107,7 @@
107 107
             <h3>{% trans "Category" %}</h3>
108 108
         </div>
109 109
         {{ category_formset.management_form }}
110
+		{{ category_formset.non_form_errors }}
110 111
         {% for category_form in category_formset %}
111 112
             {% include "partials/form_fields_inline.html" with form=category_form %}
112 113
         {% endfor %}

+ 1
- 1
tests/functional/dashboard/catalogue_tests.py Näytä tiedosto

@@ -48,7 +48,7 @@ class TestAStaffUser(WebTest):
48 48
         assert form['partner'].value == u''
49 49
 
50 50
         page = form.submit()
51
-        self.assertContains(page, 'errorlist')
51
+        self.assertFalse(page.context['stockrecord_form'].is_valid())
52 52
 
53 53
     def test_can_update_a_product_without_stockrecord(self):
54 54
         category = G(Category)

+ 0
- 1
tests/functional/dashboard/product_tests.py Näytä tiedosto

@@ -77,7 +77,6 @@ class TestCreateGroupProduct(ProductWebTest):
77 77
 
78 78
     def test_requires_a_category(self):
79 79
         response = self.submit(title="Nice T-Shirt")
80
-
81 80
         self.assertContains(response,
82 81
             "A top-level product must have at least one category")
83 82
         self.assertEquals(Product.objects.count(), 0)

Loading…
Peruuta
Tallenna