def get_all(): ''' Returns all species :return A list of Species objects: ''' data = TipuApiAPI.get_all_species() species = [] for datum in data['species']['species']: # creates a list of devices to return species.append(Species(**datum)) return species
def testGetAll(self): response = TipuApiAPI.get_all_species() self.assertTrue(str(response).startswith("{'species"))