def test_add_csv_bulk(self): ''' Adds the contents of the test data csv to the database This tests the bulk_add_customers and convert_csv methods ''' parallel.bulk_add_customers(parallel.convert_csv('customers.csv')) assert Customer.select().count() == 10000
def test_add_csv_bulk(): ''' Adds the contents of the test data csv to the database This tests the bulk_add_customers and convert_csv methods ''' bo.bulk_add_customers( bo.convert_csv('lesson04_assignment_data_customer.csv')) assert Customer.select().count() == 10000 + len(customer_id_list)
def list_active_customers(): ''' Returns the number of active customers ''' return Customer.select().where(Customer.status).count()
def get_customers_record_count(): ''' Get the Customers count ''' return Customer.select().count()