Updates cli test to expect an exception instead of False

This commit is contained in:
Sergi Delgado Segura
2020-01-20 16:40:58 +01:00
parent ff4e7f2b67
commit d7e91d34e7

View File

@@ -1,3 +1,4 @@
import pytest
import responses import responses
import json import json
import os import os
@@ -150,8 +151,8 @@ def test_load_key_file_data():
os.remove("key_test_file") os.remove("key_test_file")
# If file doesn't exist, function should fail. # If file doesn't exist, function should fail.
appt_data = pisa_cli.load_key_file_data("nonexistent_file") with pytest.raises(FileNotFoundError):
assert not appt_data assert pisa_cli.load_key_file_data("nonexistent_file")
def test_save_signed_appointment(monkeypatch): def test_save_signed_appointment(monkeypatch):