Skip to content

Commit

Permalink
Hack to work around missing mtgjson data in W16
Browse files Browse the repository at this point in the history
  • Loading branch information
gwax committed Jun 3, 2016
1 parent 68462ef commit c3f46f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mtg_ssm/mtgjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ def read_mtgjson(data_path):
reader = codecs.getreader('utf-8')
mtgdata = json.load(
reader(datafile), object_pairs_hook=collections.OrderedDict)
# Hack to work around mtg_ssm/issues/1
mtgdata['W16'].setdefault('releaseDate', '2016-04-08')
mtgdata['W16'].setdefault('type', 'starter')
return mtgdata
4 changes: 3 additions & 1 deletion tests/mtg/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def test_without_online_only(self):
'PLS',
'PLC',
'OGW',
'CHK'
'CHK',
'W16',
}
self.assertEqual(expected_set_codes, coll.code_to_card_set.keys())

Expand All @@ -98,6 +99,7 @@ def test_with_online_only(self):
'PLC',
'OGW',
'CHK',
'W16',
}
self.assertEqual(expected_set_codes, coll.code_to_card_set.keys())

Expand Down
2 changes: 2 additions & 0 deletions tests/mtgjson/data/AllSets_testdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,8 @@
"code": "W16",
"border": "black",
"block": "Shadows over Innistrad",
"releaseDate": "2016-04-08",
"type": "starter",
"cards": [
{
"artist": "Greg Staples",
Expand Down

0 comments on commit c3f46f9

Please sign in to comment.