'Test mtime update in imports if mtime given in only some records'

def testImportXMLWithPartialMTime(self):

    xmlstr = '\n<s3xml>\n                <resource    name="hms_hospital"    uuid="MTIMETESTHOSPITAL4"    modified_on="2012-03-31T00:00:00">\n                                <data    field="name">MTimeTestHospital4</data>\n                </resource>\n                <resource    name="hms_hospital"    uuid="MTIMETESTHOSPITAL5">\n                                <data    field="name">MTimeTestHospital5</data>\n                </resource>\n</s3xml>'
    xmltree = etree.ElementTree(etree.fromstring(xmlstr))
    resource = current.s3db.resource('hms_hospital')
    resource.import_xml(xmltree)
    self.assertEqual(s3_utc(resource.mtime).date(), s3_utc(datetime.datetime.utcnow()).date())
