Beispiel #1
0
    def test_get_position_in_stack(self):
        """ verify that the position of a template can be reliably found
        """
        stack = self.template.get_template_stack(self.command)
        self.assertRaises(
            ValueError, self.template.get_position_in_stack, stack)

        new_template = NestedNamespace('joe')
        self.assertEqual(
            new_template.get_position_in_stack(stack), len(stack) - 1)