Beispiel #1
0
    def fetch_images(itemdef=None):
        # FIXME: Disabled while Dota 2's item schema WebAPI doesn't work, else every /league page load is horribly slow.
        return None, None

        try:
            item_data = Schema.get_by_id(itemdef)
            return item_data.icon, item_data.image
        except KeyError:
            return None, None
Beispiel #2
0
    def fetch_images(itemdef=None):
        # FIXME: Disabled while Dota 2's item schema WebAPI doesn't work, else every /league page load is horribly slow.
        return None, None

        try:
            item_data = Schema.get_by_id(itemdef)
            return item_data.icon, item_data.image
        except KeyError:
            return None, None
Beispiel #3
0
    def test_get_by_id(self):
        drodo = Schema.get_by_id(self.DRODO['defindex'])

        self.assertIsInstance(drodo, steam.items.item)
        self.assertEqual(drodo.schema_id, self.DRODO['defindex'])
        self.assertEqual(drodo.name, self.DRODO['name'])
    def test_get_by_id(self):
        drodo = Schema.get_by_id(self.DRODO['defindex'])

        self.assertIsInstance(drodo, steam.items.item)
        self.assertEqual(drodo.schema_id, self.DRODO['defindex'])
        self.assertEqual(drodo.name, self.DRODO['name'])
Beispiel #5
0
 def fetch_images(itemdef=None):
     try:
         item_data = Schema.get_by_id(itemdef)
         return item_data.icon, item_data.image
     except KeyError:
         return None, None