Ejemplo n.º 1
0
    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')
Ejemplo n.º 2
0
    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")
Ejemplo n.º 3
0
    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')
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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))
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
 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))
Ejemplo n.º 8
0
 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))
Ejemplo n.º 9
0
 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))