import TSN.Database ( insert_or_select )
import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate )
import TSN.Location ( Location(..), pickle_location )
-import TSN.Picklers ( xp_time_stamp )
+import TSN.Picklers ( xp_attr_option, xp_time_stamp )
import TSN.Team ( Team(..) )
import TSN.XmlImport ( XmlImport(..) )
import Xml (
ToDb(..),
pickle_unpickle,
unpickleable,
- unsafe_read_document,
+ unsafe_read_invalid_document,
unsafe_unpickle )
pickle_msg_id =
xpElem "msg_id" $
xpWrap (from_tuple, H.convert) $
- xpPair xpInt (xpAttr "EventId" (xpOption xpInt))
+ xpPair xpInt (xpAttr "EventId" xp_attr_option)
where
from_tuple = uncurryN MsgId
False ]
where
check path desc expected = testCase desc $ do
- xmltree <- unsafe_read_document path
+ xmltree <- unsafe_read_invalid_document path
let actual = has_only_single_sms xmltree
actual @?= expected