def create_party(self, party_id, title): party = create_party(id=party_id, title=title, brand=self.brand) self.db.session.add(party) self.db.session.commit() return party
def create_brand_and_party(self): self.brand = create_brand() db.session.add(self.brand) self.party = create_party(brand=self.brand) db.session.add(self.party) db.session.commit()
def create_custom_brand_and_party(self): brand = create_brand(id='custom', title='Custom Events') party = create_party(id='custom-party-4', brand=brand, title='Custom Party 4') self._persist(brand, party) return party
def create_brand_and_party(self): self.brand = create_brand(id='lanresort', title='LANresort') self.db.session.add(self.brand) self.party = create_party(id='lanresort-2015', brand=self.brand, title='LANresort 2015') self.db.session.add(self.party) self.db.session.commit()
def test_generate_order_number_custom(self): last_assigned_order_serial_number = 206 brand = create_brand(code='LOL') party = create_party(brand=brand, number=3) self.set_order_number_sequence(value=last_assigned_order_serial_number) actual = generate_order_number(party) self.assertEqual(actual, 'LOL-03-B00207')
def test_generate_article_number_custom(self): last_assigned_article_serial_number = 41 brand = create_brand(code='XYZ') party = create_party(brand=brand, number=9) self.set_article_number_sequence(value=last_assigned_article_serial_number) actual = generate_article_number(party) self.assertEqual(actual, 'XYZ-09-A00042')
def create_brand_and_party(self): self.brand = create_brand( id='lanresort', title='LANresort') self.db.session.add(self.brand) self.party = create_party( id='lanresort-2015', brand=self.brand, title='LANresort 2015') self.db.session.add(self.party) self.db.session.commit()
def create_party(self, id, title): party = create_party(id=id, title=title, brand=self.brand) self.db.session.add(party) self.db.session.commit() return party