def test_update_pg(reset_db, default_init): start_time = 10 end_time = 20 DataManager.store_new(default_init) id = DataManager.id_of_obj(default_init) DataManager.update_pg(id, start_time=start_time, end_time=end_time) from_db = DataManager.get(name=default_init.name) assert from_db.start_time != default_init.start_time assert from_db.end_time != default_init.end_time assert from_db.start_time == start_time assert from_db.end_time == end_time
def test_get(reset_db, default_init): DataManager.store_new(default_init) result = DataManager.get(name=default_init.name) assert result == default_init