Example #1
0
 def test_put(self):
     func = Mock()
     value = "test_value"
     a = Attribute("test", Mock())
     a.set_put_function(func)
     a.put(value)
     func.assert_called_once_with(value)
Example #2
0
 def test_put(self):
     func = Mock()
     value = "test_value"
     a = Attribute("test", Mock())
     a.set_put_function(func)
     a.put(value)
     func.assert_called_once_with(value)
Example #3
0
 def test_set_put_function(self):
     func = Mock()
     a = Attribute("test", Mock())
     a.set_put_function(func)
     self.assertIs(func, a.put_func)
Example #4
0
 def test_set_put_function(self):
     func = Mock()
     a = Attribute("test", Mock())
     a.set_put_function(func)
     self.assertIs(func, a.put_func)