def test_message_location_str_defaults_to_userprofile_location_str_if_no_location(self): message = self.message.copy() message['text'] = "NECOC.UnknownLocation. there are some serious fire over here" rapid_pro_message = RapidProMessage(**message).save() self.assertEqual(self.mobile_user.location.__unicode__(), rapid_pro_message.location_str())
def test_message_location_str_returns_the_to_str_of_its_location(self): message = self.message.copy() message['text'] = "NECOC.Bukoto. there are some serious fire over here" rapid_pro_message = RapidProMessage(**message).save() self.assertEqual("Kampala >> Bukoto", rapid_pro_message.location_str())
def test_message_location_str_returns_the_to_str_of_its_location(self): message = self.message.copy() message['text'] = "NECOC.Bukoto. there are some serious fire over here" rapid_pro_message = RapidProMessage(**message).save() self.assertEqual("Kampala >> Bukoto", rapid_pro_message.location_str())
def test_message_location_str_defaults_to_userprofile_location_str_if_no_location( self): message = self.message.copy() message[ 'text'] = "NECOC.UnknownLocation. there are some serious fire over here" rapid_pro_message = RapidProMessage(**message).save() self.assertEqual(self.mobile_user.location.__unicode__(), rapid_pro_message.location_str())