(self)
| 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): |
nothing calls this directly
no test coverage detected