def test_save(database, sample_measurement): database_client = DatabaseClient(database) values = [1, 2] for v in values: database_client.save(sample_measurement, v) assert database_client.load(sample_measurement, '1s') == values
def test_load(sample_data, sample_measurement, sample_database, database_with_data): database_client = DatabaseClient(database_with_data, db_name=sample_database) assert sample_data == database_client.load( sample_measurement, time_window='{}s'.format(len(sample_data) + 1))