def test_add_record_item(self): schema_field = SchemaField('', 0, 'TEXT') record_item = RecordItem(1, schema_field) record = Record() record.add_record_item(record_item) record.add_record_item(record_item) self.assertEqual(2, len(record.record_items))
def book(self, ticket_id: int): # забронировать self.record_resource.post(Record(user_id=current_user.id, ticket_id=ticket_id, purchase_date=datetime.now(), record_type_id=2))