Beispiel #1
0
    def test_05(self):
        """
        Test Case 05:
        Try setting :py:meth:`magrathea.core.template.Template.template` to an existing template.

        Test is passed if :py:meth:`magrathea.core.template.Template.template` points to this template.
        """
        obj = Template()
        obj.template = 'planet'
        self.assertEqual(obj.template, 'planet')
Beispiel #2
0
    def test_06(self):
        """
        Test Case 06:
        Try setting :py:meth:`magrathea.core.template.Template.template` to a non-existing template.

        Test is passed if :py:meth:`magrathea.core.template.Template.template` points to its previous value.
        """
        obj = Template()
        name = obj.template
        obj.template = 'foo'
        self.assertEqual(obj.template, name)