def METHOD_NAME(self):
    loc_type1 = OTHER_DETAILS.copy()
    loc_type2 = OTHER_DETAILS.copy()
    loc_type1.update({'name': self.loc_type2.name, 'pk': self.loc_type1.pk})
    loc_type2.update({'name': self.loc_type1.name, 'pk': self.loc_type2.pk})
    data = {'loc_types': [loc_type1, loc_type2]}
    response = self.send_request(data)
    messages = list(get_messages(response.wsgi_request))
    self.assertEqual(
        str(messages[0].message),
        'Looks like you are assigning a location name/code to a different location in the same request. '
        'Please do this in two separate updates by using a temporary name to free up the name/code to be '
        're-assigned.'
    )