def test_get_by_id(self): """ Test we can get an item by its ID """ blink_dagger = Item.get_by_id(self.BLINK_DAGGER['id']) self.assertIsNotNone(blink_dagger) self.assertEqual(blink_dagger.id, self.BLINK_DAGGER['id']) self.assertEqual(blink_dagger.token, self.BLINK_DAGGER['token']) self.assertEqual(blink_dagger.localized_name, self.BLINK_DAGGER['localized_name']) self.assertEqual(blink_dagger.icon, url_for('item_icon', item_filename=self.BLINK_DAGGER['image_filename']))
def test_get_by_id(self): """ Test we can get an item by its ID """ blink_dagger = Item.get_by_id(self.BLINK_DAGGER['id']) self.assertIsNotNone(blink_dagger) self.assertEqual(blink_dagger.id, self.BLINK_DAGGER['id']) self.assertEqual(blink_dagger.token, self.BLINK_DAGGER['token']) self.assertEqual(blink_dagger.localized_name, self.BLINK_DAGGER['localized_name']) self.assertEqual( blink_dagger.icon, url_for('item_icon', item_filename=self.BLINK_DAGGER['image_filename']))
def items(self): return [ Item.get_by_id(self.item_0), Item.get_by_id(self.item_1), Item.get_by_id(self.item_2), Item.get_by_id(self.item_3), Item.get_by_id(self.item_4), Item.get_by_id(self.item_5) ]