def test_from_data_unknown(self): with self.assertRaises(ValueError): cmd = Proto2Command.from_data({})
def create(self, name="name", params="params"): return Proto2Command(name, params)
def test_from_data_emulator_shell(self): data = {"emulator_shell": "emulator_shell"} cmd = Proto2Command.from_data(data) self.assertEqual("runEmulatorShell", cmd.name) self.assertEqual(data, cmd.params)