Skip to content

Commit 3041e3b

Browse files
committed
test fixing
1 parent f58e4f7 commit 3041e3b

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

tests/client/test_analyser.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_find_context(file_and_context, tmp_path):
8585
file_name, context = file_and_context
8686

8787
# Pass the file to the Analyser; add environment as needed
88-
analyser = Analyser(basepath_local=tmp_path)
88+
analyser = Analyser(basepath_local=tmp_path, token="")
8989

9090
# Check that the results are as expected
9191
assert analyser._find_context(tmp_path / file_name)
@@ -115,13 +115,13 @@ def test_find_context(file_and_context, tmp_path):
115115

116116
@pytest.mark.parametrize("bad_file", contextless_files)
117117
def test_ignore_contextless_files(bad_file, tmp_path):
118-
analyser = Analyser(tmp_path)
118+
analyser = Analyser(tmp_path, "")
119119
assert not analyser._find_context(tmp_path / bad_file)
120120
assert not analyser._context
121121

122122

123123
def test_analyser_setup_and_stopping(tmp_path):
124-
analyser = Analyser(tmp_path)
124+
analyser = Analyser(tmp_path, "")
125125
assert analyser.queue.empty()
126126
analyser.start()
127127
assert analyser.thread.is_alive()
@@ -132,7 +132,7 @@ def test_analyser_setup_and_stopping(tmp_path):
132132

133133
def test_analyser_tomo_determination(tmp_path):
134134
tomo_file = tmp_path / "Position_1_[30.0].tiff"
135-
analyser = Analyser(tmp_path)
135+
analyser = Analyser(tmp_path, "")
136136
analyser.start()
137137
analyser.queue.put(tomo_file)
138138
analyser.stop()
@@ -141,7 +141,7 @@ def test_analyser_tomo_determination(tmp_path):
141141

142142
def test_analyser_epu_determination(tmp_path):
143143
tomo_file = tmp_path / "FoilHole_12345_Data_6789_Fractions.tiff"
144-
analyser = Analyser(tmp_path)
144+
analyser = Analyser(tmp_path, "")
145145
analyser.start()
146146
analyser.queue.put(tomo_file)
147147
analyser.stop()

tests/client/test_context.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_tomography_context_add_tomo_tilt(mock_post, mock_get, tmp_path):
2828
visit="test",
2929
murfey_session=1,
3030
)
31-
context = TomographyContext("tomo", tmp_path)
31+
context = TomographyContext("tomo", tmp_path, "")
3232
(tmp_path / "Position_1_001_[30.0]_date_time_fractions.tiff").touch()
3333
context.post_transfer(
3434
tmp_path / "Position_1_001_[30.0]_date_time_fractions.tiff",
@@ -85,7 +85,7 @@ def test_tomography_context_add_tomo_tilt_out_of_order(mock_post, mock_get, tmp_
8585
visit="test",
8686
murfey_session=1,
8787
)
88-
context = TomographyContext("tomo", tmp_path)
88+
context = TomographyContext("tomo", tmp_path, "")
8989
(tmp_path / "Position_1_001_[30.0]_date_time_fractions.tiff").touch()
9090
context.post_transfer(
9191
tmp_path / "Position_1_001_[30.0]_date_time_fractions.tiff",
@@ -170,7 +170,7 @@ def test_tomography_context_add_tomo_tilt_delayed_tilt(mock_post, mock_get, tmp_
170170
visit="test",
171171
murfey_session=1,
172172
)
173-
context = TomographyContext("tomo", tmp_path)
173+
context = TomographyContext("tomo", tmp_path, "")
174174
(tmp_path / "Position_1_001_[30.0]_date_time_fractions.tiff").touch()
175175
context.post_transfer(
176176
tmp_path / "Position_1_001_[30.0]_date_time_fractions.tiff",
@@ -214,7 +214,7 @@ def test_tomography_context_add_tomo_tilt_delayed_tilt(mock_post, mock_get, tmp_
214214

215215

216216
def test_tomography_context_initialisation_for_serialem(tmp_path):
217-
context = TomographyContext("serialem", tmp_path)
217+
context = TomographyContext("serialem", tmp_path, "")
218218
assert not context._completed_tilt_series
219219
assert context._acquisition_software == "serialem"
220220

@@ -235,7 +235,7 @@ def test_setting_tilt_series_size_and_completion_from_mdoc_parsing(
235235
visit="test",
236236
murfey_session=1,
237237
)
238-
context = TomographyContext("tomo", tmp_path)
238+
context = TomographyContext("tomo", tmp_path, "")
239239
assert len(context._tilt_series_sizes) == 0
240240
context.post_transfer(
241241
Path(__file__).parent.parent / "util" / "test_1.mdoc",

tests/client/tui/test_main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def test_get_visit_list(
6060
base_url=server_url,
6161
router_name="session_control.router",
6262
function_name="get_current_visits",
63+
token="",
6364
instrument_name=instrument_name,
6465
)
6566

0 commit comments

Comments
 (0)