MCPcopy Index your code
hub / github.com/PokeAPI/pokeapi / setup_pokemon_data

Method setup_pokemon_data

pokemon_v2/tests.py:1519–1544  ·  view source on GitHub ↗
(
        cls,
        pokemon_species=None,
        name="pkmn",
        height=100,
        weight=100,
        base_experience=0,
        order=1,
        is_default=False,
    )

Source from the content-addressed store, hash-verified

1517
1518 @classmethod
1519 def setup_pokemon_data(
1520 cls,
1521 pokemon_species=None,
1522 name="pkmn",
1523 height=100,
1524 weight=100,
1525 base_experience=0,
1526 order=1,
1527 is_default=False,
1528 ):
1529 pokemon_species = pokemon_species or cls.setup_pokemon_species_data(
1530 name="pkmn spcs for " + name
1531 )
1532
1533 pokemon = Pokemon.objects.create(
1534 name=name,
1535 pokemon_species=pokemon_species,
1536 height=height,
1537 weight=weight,
1538 base_experience=base_experience,
1539 order=order,
1540 is_default=is_default,
1541 )
1542 pokemon.save()
1543
1544 return pokemon
1545
1546 @classmethod
1547 def setup_pokemon_game_index_data(cls, pokemon, game_index=0):

Callers 11

setup_encounter_dataMethod · 0.80
test_ability_apiMethod · 0.80
test_item_apiMethod · 0.80
test_type_apiMethod · 0.80
test_move_apiMethod · 0.80
test_pokemon_apiMethod · 0.80
test_pokemon_form_apiMethod · 0.80

Calls 1

Tested by

no test coverage detected