def test_getfield_lower_unicode(self):
     r = {
         "dwc:scientificName": "puma concolor",
         "dwc:institutionCode": u"BLAH"
     }
     self.assertEqual(
         "blah", conversions.getfield("dwc:institutionCode", r, "text"))
 def test_getfield_newformat(self):
     r = {
         "dwc:scientificname": "puma concolor",
         "dwc:institutioncode": "BLAH"
     }
     self.assertEqual("puma concolor",
                      conversions.getfield("dwc:scientificName", r, "text"))
 def test_getfield_none_list(self):
     r = {"idigbio:recordIds": None}
     self.assertEqual(None,
                      conversions.getfield("idigbio:recordIds", r, "list"))