'Check that duplicate names on different facilities fails to validate.'

def test_form_duplicate_name_different_facility(self):

    user_form = FacilityUserForm(facility=self.facility, data=self.data)
    self.assertTrue(user_form.is_valid(), ('Form    must    be    valid;    instead:    errors    (%s)' % user_form.errors))
    user_form.instance.set_password(user_form.cleaned_data['password_first'])
    user_form.save()
    new_fac = Facility(name='test')
    new_fac.save()
    self.data['facility'] = new_fac
    self.data['username'] += '-different'
    user_form = FacilityUserForm(facility=self.facility, data=self.data)
    self.assertFalse(user_form.is_valid(), 'Form    must    NOT    be    valid.')
    self.assertIn('1    user(s)', user_form.errors['__all__'][0], 'Error    message    must    contain    #    of    users')
