Skip to content

Commit

Permalink
#217: Add test case for invalid backend name
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Apr 8, 2021
1 parent 0aec6da commit af49cd1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ class TestBackends:
pytest.param("python_icat", PythonICATBackend, id="Python ICAT Backend"),
],
)
def test_backend_creation(self, backend_name, backend_type):
def test_valid_backend_creation(self, backend_name, backend_type):
test_backend = create_backend(backend_name)

assert type(test_backend) == backend_type

def test_invalid_backend_creation(self):
with pytest.raises(SystemExit):
create_backend("invalid_backend_name")

def test_abstract_class(self):
"""
Test the `Backend` abstract class has all required abstract methods for the API
Expand Down

0 comments on commit af49cd1

Please sign in to comment.