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

Method test_characteristic_values

pokemon_v2/tests.py:4396–4408  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4394 )
4395
4396 def test_characteristic_values(self):
4397 # check for all 5 possible values of gene_modulo
4398 for modulo in range(5):
4399 characteristic = self.setup_characteristic_data(gene_mod_5=modulo)
4400 # note that 'possible_values' is computed solely from gene_modulo
4401 # thus it is fine that our test characteristics are indexed 1-5
4402 result = self.client.get(
4403 "{}/characteristic/{}/".format(API_V2, characteristic.pk)
4404 )
4405 for i in range(len(result.data["possible_values"])):
4406 self.assertEqual(
4407 result.data["possible_values"][i], characteristic.gene_mod_5 + i * 5
4408 )
4409
4410 # Nature Tests
4411 def test_nature_api(self):

Callers

nothing calls this directly

Calls 2

getMethod · 0.80

Tested by

no test coverage detected