Exemple #1
0
    def test_generate_article_number_default(self):
        self.create_brand_and_party()

        self.setup_article_number_sequence(self.party.id, 'AEC-01-A')

        actual = generate_article_number(self.party.id)

        assert actual == 'AEC-01-A00001'
Exemple #2
0
    def test_generate_article_number_custom(self):
        party = self.create_custom_brand_and_party()
        last_assigned_article_sequence_number = 41

        self.setup_article_number_sequence(
            party.id, 'XYZ-09-A', value=last_assigned_article_sequence_number)

        actual = generate_article_number(party.id)

        assert actual == 'XYZ-09-A00042'
    def test_generate_article_number_custom(self):
        party = self.create_custom_brand_and_party()
        last_assigned_article_sequence_number = 41

        self.setup_article_number_sequence(party, 'XYZ-09-A',
            value=last_assigned_article_sequence_number)

        actual = generate_article_number(party.id)

        self.assertEqual(actual, 'XYZ-09-A00042')
    def test_generate_article_number_custom(self):
        last_assigned_article_sequence_number = 41

        self.create_article_number_sequence(
            self.shop.id,
            'XYZ-09-A',
            value=last_assigned_article_sequence_number)

        actual = generate_article_number(self.shop.id)

        assert actual == 'XYZ-09-A00042'
    def test_generate_article_number_default(self):
        self.create_article_number_sequence(self.shop.id, 'AEC-01-A')

        actual = generate_article_number(self.shop.id)

        assert actual == 'AEC-01-A00001'
    def test_generate_article_number_default(self):
        self.setup_article_number_sequence(self.party, 'AEC-01-A')

        actual = generate_article_number(self.party.id)

        self.assertEqual(actual, 'AEC-01-A00001')
    def test_generate_article_number_default(self):
        self.setup_article_number_sequence(self.party, 'AEC-01-A')

        actual = generate_article_number(self.party.id)

        self.assertEqual(actual, 'AEC-01-A00001')