Example #1
0
    def test_get_value_with_existing_value(self):
        """
        Test case to check the working of 'GetValue'
        method in Proxy when the current action node
        already houses a value.
        """
        node = Node(None, None)
        proxy = ActionProxy(node)
        node.value = 5

        self.assertEqual(proxy.GetValue(), 5)
Example #2
0
    def test_return_value(self):
        """
        Proxy object computes and returns the right output based on the
        function call.
        """
        t = AttrReadTest.Temp()
        node = Node(None, None)
        node.value = t
        proxy = ActionProxy(node)

        self.assertEqual(proxy.val(21), 144)