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

Added tab registration

parent ee74795c
Branches
No related tags found
2 merge requests!23Tabbed view header styling,!19Tab registry
_pool = {}
def register_tab(name, tab):
global _pool
_pool[name] = tab
def get_tab(name):
global _pool
return _pool[name]
import pytest
from ..tab_pool import register_tab, get_tab
class TestTab(object):
pass
@pytest.fixture
def tab():
return TestTab()
@pytest.mark.django_db
def test_tab_is_registered(tab):
register_tab('test-tab', tab)
assert get_tab('test-tab') == tab
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment