Skip to content
Snippets Groups Projects
Commit 5f7a654b authored by Martin Burchell's avatar Martin Burchell
Browse files

Added test for registering tabs with same name

parent 68023b8e
2 merge requests!23Tabbed view header styling,!19Tab registry
...@@ -29,3 +29,12 @@ def test_tab_is_registered(tab): ...@@ -29,3 +29,12 @@ def test_tab_is_registered(tab):
def test_exception_when_tab_not_registered(tab): def test_exception_when_tab_not_registered(tab):
with pytest.raises(MissingTabError): with pytest.raises(MissingTabError):
get_tab('test-tab') get_tab('test-tab')
def test_registering_twice_overrides_existing_tab(tab):
register_tab('test-tab', tab)
tab2 = TestTab()
register_tab('test-tab', tab2)
assert get_tab('test-tab') == tab2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment