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

Method setup_item_sprites_data

pokemon_v2/tests.py:314–326  ·  view source on GitHub ↗
(cls, item, default=True)

Source from the content-addressed store, hash-verified

312
313 @classmethod
314 def setup_item_sprites_data(cls, item, default=True):
315 sprite_path = "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/items/%s.png"
316
317 sprites = {
318 "default": sprite_path % item.id if default else None,
319 }
320
321 item_sprites = ItemSprites.objects.create(
322 item=item, sprites=json.dumps(sprites)
323 )
324 item_sprites.save()
325
326 return item_sprites
327
328 @classmethod
329 def setup_item_data(

Callers 1

test_item_apiMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected