filterAxis,
followingSiblingAxis,
hasName,
- readDocument,
remNav,
runLA,
- runX,
xp8Tuple,
xp9Tuple,
xpAttr,
FromXml(..),
FromXmlFk(..),
ToDb(..),
- parse_opts,
pickle_unpickle,
unpickleable,
+ unsafe_read_document,
unsafe_unpickle )
reference:
onDelete: cascade
-# We rename the two fields that needed a "dtl" prefix to avoid a name clash.
+ # We rename the two fields that needed a "dtl" prefix to avoid a name
+ # clash.
- entity: WeatherDetailedWeatherListingItem
dbName: weather_detailed_items
constructors:
actual @?= expected
--- | This is used in a few tests to extract an 'XmlTree' from a path.
---
-unsafe_get_xmltree :: String -> IO XmlTree
-unsafe_get_xmltree path =
- fmap head $ runX $ readDocument parse_opts path
-
-
-- | We want to make sure type1 documents are detected as type1, and
-- type2 documents detected as type2..
--
test_types_detected_correctly :: TestTree
test_types_detected_correctly =
- testGroup "weatherxml types detected correctly" $
+ testGroup "weatherxml types detected correctly"
[ check "test/xml/weatherxml.xml"
"first type detected correctly"
True,
False ]
where
check path desc expected = testCase desc $ do
- xmltree <- unsafe_get_xmltree path
+ xmltree <- unsafe_read_document path
let actual = is_type1 xmltree
actual @?= expected
False ]
where
check desc path expected = testCase desc $ do
- xmltree <- unsafe_get_xmltree path
+ xmltree <- unsafe_read_document path
let actual = teams_are_normal xmltree
actual @?= expected