def testClearWithSpaceArgument(self): space = Space("Hellow world") space.clear("hey there") self.assertEqual(space.length(), 1) self.assertEqual(space.get('hey'), 'there', 'Clear with a Space argument should deep copy the argument Space')
def testClear(self): space = Space('Hello world') self.assertEqual(space.length(), 1) self.assertTrue(isinstance(space.clear(), Space), 'clear returns Space so chainable') self.assertEqual(space.length(), 0)