def test_isValid_fails_when_hop_data_None(self): data = {'to': 'foo', 'hop': None} command = Command(data) self.assertFalse(command.isValid())
def test_isValid_fails_when_to_data_None(self): data = {'to': None, 'hop': 'bar'} command = Command(data) self.assertFalse(command.isValid())
def test_isValid_passes(self): data = {'to': 'foo', 'hop': 'bar'} command = Command(data) self.assertTrue(command.isValid())