Skip to content

Commit e484426

Browse files
author
Max
committed
refactor: Now uses IntEnum for better usability.
1 parent b9b813f commit e484426

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import enum
22

33

4-
class Apps(enum.Enum):
4+
class Apps(enum.IntEnum):
55
TEAM_FORTRESS_2 = 440
66
DOTA_2 = 570
77
CS2 = 730
@@ -10,7 +10,7 @@ class Apps(enum.Enum):
1010
PUBG = 578080
1111

1212

13-
class Currency(enum.Enum):
13+
class Currency(enum.IntEnum):
1414
# ISO 4217
1515
USD = 1 # United States dollar
1616
GBP = 2 # Pound sterling

test_market_scraper.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,6 @@ def test_market_scraper_invalid_currency_type(self):
5454
'USD',
5555
)
5656

57-
def test_market_scraper_invalid_app_id_without_value(self):
58-
with self.assertRaises(TypeError):
59-
scraper.market_scraper(
60-
'Dreams & Nightmares Case',
61-
data.Apps.CS2,
62-
data.Currency.USD.value,
63-
)
64-
65-
def test_market_scraper_invalid_currency_without_value(self):
66-
with self.assertRaises(TypeError):
67-
scraper.market_scraper(
68-
'Dreams & Nightmares Case',
69-
data.Apps.CS2.value,
70-
data.Currency.USD,
71-
)
72-
7357
def test_market_scraper_item_name_consist_solely_of_whitespace(self):
7458
with self.assertRaises(ValueError):
7559
scraper.market_scraper(

0 commit comments

Comments
 (0)