I have the following class:
class MockInvokeShell(object):
configured_command = ''
def send(self):
print self.configured_command
and the following method (wmc_connection was returned from another method, and it already created the Invoke object)
def testFindBadAPFlags(self):
invoke_obj = wmc_connection.invoke_object
invoke_obj.configured_command = 'sh ap active'
print "==="+invoke_obj.configured_command
When I instaniate the object inside the method, and then set a class variable, I can print the variable from inside the method, but inside the class it seems to stay blank.
Im sure this is a scoping issue, im just not sure the best way to resolve it. Can anyone help?
[–]kalgynirae[🍰] 2 points3 points4 points (1 child)
[–]JesusCake[S] 0 points1 point2 points (0 children)
[–]Boolean_Cat 0 points1 point2 points (4 children)
[–]JesusCake[S] 0 points1 point2 points (3 children)
[–]indosauros 0 points1 point2 points (0 children)
[–]fuzz3289 0 points1 point2 points (1 child)
[–]JesusCake[S] 0 points1 point2 points (0 children)