Skip to content Skip to sidebar Skip to footer

Error While Running Test Case

I need to test my code below. I am using one test to see if it is working or not. but dont know what exactly I should pass as a parameter in the test code. Please see the test code

Solution 1:

In your testOne() method, you're calling _create_device(), which isn't a global function it's a method on SwitchPower objects.

You probably want to create a new SwitchPower object.


Solution 2:

_create_device() is not defined in class IsOddTests. It is defined in BinaryLight.

I'm not completely sure about this, but what about changing:

self.failUnless(_create_device('urn:schemas=upnp-org:device:BinaryLight:1'))

to:

bl = BinaryLight()
self.failUnless(bl._create_device())

I removed:

'urn:schemas=upnp-org:device:BinaryLight:1'

because it was in the definition of _create_device().


Post a Comment for "Error While Running Test Case"