Esempio n. 1
0
    def test_display_pagination_navigation(self):
        url_name = 'dashboard:catalogue-attribute-option-group-list'
        per_page = settings.OSCAR_DASHBOARD_ITEMS_PER_PAGE
        attribute_option_group_name = 'Test Attribute Option Group #%d'

        for i in range(0, int(1.5 * per_page)):
            AttributeOptionGroupFactory(name=attribute_option_group_name % i)

        page = self.get(reverse(url_name))

        # Test the pagination
        self.assertContains(page, 'Page 1 of 2')
 def _create_object_factory(self):
     obj = AttributeOptionGroupFactory()
     AttributeOptionFactory(group=obj)
     return obj
 def _create_object(self, idx):
     attribute_option_group_name = 'Test Attribute Option Group #%d'
     AttributeOptionGroupFactory(name=attribute_option_group_name % idx)
Esempio n. 4
0
    def setUp(self):
        super(TestAttributeOptionGroupDeleteView, self).setUp()

        self.attribute_option_group = AttributeOptionGroupFactory()
        AttributeOptionFactory(group=self.attribute_option_group)
Esempio n. 5
0
    def setUp(self):
        super().setUp()

        self.attribute_option_group = AttributeOptionGroupFactory()
        AttributeOptionFactory(group=self.attribute_option_group)