From 0ca45bcd3c351ecb0049396941c17363e501d83e Mon Sep 17 00:00:00 2001 From: Markus Gerstel Date: Tue, 16 Apr 2019 10:59:52 +0100 Subject: [PATCH] update model tests to point to new API call --- tests/model/test_datacollection.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/model/test_datacollection.py b/tests/model/test_datacollection.py index 5ed9d826..f11ed8e0 100644 --- a/tests/model/test_datacollection.py +++ b/tests/model/test_datacollection.py @@ -6,23 +6,23 @@ def test_datacollection_model_retrieves_database_records(): db, record = mock.Mock(), mock.Mock() - db.retrieve_data_collection_main.return_value = [record] + db.retrieve_data_collection.return_value = [record] dc = ispyb.model.datacollection.DataCollection(1234, db) - assert not db.retrieve_data_collection_main.called + assert not db.retrieve_data_collection.called assert '1234' in str(dc) assert '1234' in repr(dc) assert 'uncached' in repr(dc) dc.load() - db.retrieve_data_collection_main.assert_called_once_with(1234) + db.retrieve_data_collection.assert_called_once_with(1234) assert dc._data == record assert '1234' in repr(dc) assert 'cached' in repr(dc) and 'uncached' not in repr(dc) # Test caching behaviour dc.load() - db.retrieve_data_collection_main.assert_called_once() + db.retrieve_data_collection.assert_called_once() def test_datacollection_model_accepts_preloading(): @@ -32,7 +32,7 @@ def test_datacollection_model_accepts_preloading(): assert dc._data == record dc.load() - assert not db.retrieve_data_collection_main.called + assert not db.retrieve_data_collection.called database_column_to_attribute_name = {