def test_load_pod_title(self): """ The load_pod function should set the config title, or default it title field to the pod type title if it isn't given. """ pod = load_pod(23, {'label': 'base_pod', 'title': 'Foo'}) self.assertEqual(pod.config.title, 'Foo') pod = load_pod(23, {'label': 'base_pod'}) self.assertEqual(pod.config.title, 'Pod')
def test_load_pod_title(self): """ The load_pod function should set the config title, or default it title field to the pod type title if it isn't given. """ pod = load_pod(23, {"label": "base_pod", "title": "Foo"}) self.assertEqual(pod.config.title, "Foo") pod = load_pod(23, {"label": "base_pod"}) self.assertEqual(pod.config.title, "Pod")
def test_load_pod_title(self): """ The load_pod function should set the config title, or default it title field to the pod type title if it isn't given. """ pod = load_pod(23, { 'label': 'base_pod', 'title': 'Foo' }) self.assertEqual(pod.config.title, 'Foo') pod = load_pod(23, {'label': 'base_pod'}) self.assertEqual(pod.config.title, 'Pod')
def test_load_pod_index(self): """ The load_pod function should set the index on the pod config. """ index = 7 pod_instance = load_pod(index, {'label': 'base_pod'}) self.assertEqual(pod_instance.config.index, index)
def test_load_pod_label(self): """ The load_pod function should load the pod with the correct app label specified by 'type'. """ from casepro.pods import Pod pod_instance = load_pod(0, {'label': 'base_pod'}) self.assertTrue(isinstance(pod_instance, Pod))
def test_load_pod_config(self): """ The load_pod function instantiate and pass through the pod's config. """ from casepro.pods import PodConfig index = 7 pod = load_pod(index, {'label': 'base_pod'}) self.assertTrue(isinstance(pod.config, PodConfig))