コード例 #1
0
    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']))
コード例 #2
0
ファイル: test_dota.py プロジェクト: vault101/dotabank-web
    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']))
コード例 #3
0
ファイル: models.py プロジェクト: MariosRichards/dotabank-web
 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)
     ]
コード例 #4
0
ファイル: models.py プロジェクト: vault101/dotabank-web
 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)
     ]