def test_create_pokemon(self, MockPoke): MockPoke.return_value = {"id_pokedex": "lalala", "especie": "cholo", "tipo": "agresivo" } esperado = {"id_pokedex": "lalala", "especie": "cholo", "tipo": "agresivo" } poke = PokeApi() real = poke.create_pokemon(1, "jombalash") self.assertEqual(esperado, real)
def test_write_move_list(self, MockMove): MockMove.return_value = """1 bailar el tucanazo, 2 oler a limón, 3 comer helado, 4 caminar """ esperado = """1 bailar el tucanazo, 2 oler a limón, 3 comer helado, 4 caminar """ poke = PokeApi() real = poke.write_move_list(poke) self.assertEqual(esperado, real)
def write_move_list(self, pokemon_id: int): api = PokeApi() api.write_move_list(pokemon_id)
def createPokemon(self, data, generacion: int): api = PokeApi() return pokebase(**api.create_pokemon(generacion, data))
def read_pokemon_list(self): pokeapi = PokeApi() pokeapi.write_pokemon_list(const.Equipo.generacion) subprocess.run(f"{const.READ_COMMAND} pokemon_list.txt", shell=True)
def test_write_pokemon_list(self, MockWrite): MockWrite.return_value = 151 poke = PokeApi() esperado = 151 real = poke.write_pokemon_list("oli") self.assertEqual(esperado, real)