-1. Write a test for test/xml/Odds_XML-long-import.xml once it no
- longer takes 10 minutes to import (Postgres only?).
-
-2. We have DTDs but no sample XML for the following SportInfo types,
+1. We have DTDs but no sample XML for the following SportInfo types,
which have therefore been left unimplmented for now:
* CBASK_StealsXML.dtd
-3. The following DTD types were handled (in some form) by the old
+2. The following DTD types were handled (in some form) by the old
FeedGrabber. They are not yet handled by htsn-import (some may not
be valid):
* WNBA_Individual_Stats_XML
* WNBATeamScheduleXML
-4. Consolidate all of the make_game_time functions which take a
+3. Consolidate all of the make_game_time functions which take a
date/time and produce a combined time.
-5. Factor out test code where possible; a lot of them differ only in
+4. Factor out test code where possible; a lot of them differ only in
the filename.
-6. Combine test XML files where possible.
+5. Combine test XML files where possible. We don't need to e.g. import
+ two copies of newsxml just because one has an empty attribute that
+ we want to test: we could just delete an attribute from the first
+ file.
"test/xml/Odds_XML-tba-game-time.xml",
check "pickle composed with unpickle is the identity (empty casino)"
- "test/xml/Odds_XML-empty-casino.xml" ]
+ "test/xml/Odds_XML-empty-casino.xml",
+
+ check "pickle composed with unpickle is the identity (long import)"
+ "test/xml/Odds_XML-long-import.xml" ]
where
check desc path = testCase desc $ do
(expected, actual) <- pickle_unpickle pickle_message path
"test/xml/Odds_XML-tba-game-time.xml",
check "unpickling succeeds (empty casino)"
- "test/xml/Odds_XML-empty-casino.xml" ]
+ "test/xml/Odds_XML-empty-casino.xml",
+
+ check "unpickling succeeds (long-import)"
+ "test/xml/Odds_XML-long-import.xml" ]
where
check desc path = testCase desc $ do
actual <- unpickleable path pickle_message
check "deleting odds deleted its children (empty casino)"
"test/xml/Odds_XML-empty-casino.xml"
11 -- 5 casinos, 6 teams
+ ,
+ check "deleting odds deleted its children (long import)"
+ "test/xml/Odds_XML-long-import.xml"
+ 219 -- 5 casinos, 214 teams
]
where
check desc path expected = testCase desc $ do