'User addition through a FK popup should return the appropriate JavaScript response.'

def test_user_fk_add_popup(self):

    response = self.client.get(reverse('admin:admin_views_album_add'))
    self.assertContains(response, reverse('admin:auth_user_add'))
    self.assertContains(response, 'class="related-widget-wrapper-link    add-related"    id="add_id_owner"')
    response = self.client.get((reverse('admin:auth_user_add') + '?_popup=1'))
    self.assertNotContains(response, 'name="_continue"')
    self.assertNotContains(response, 'name="_addanother"')
    data = {'username': 'newuser', 'password1': 'newpassword', 'password2': 'newpassword', '_popup': '1', '_save': '1'}
    response = self.client.post((reverse('admin:auth_user_add') + '?_popup=1'), data, follow=True)
    self.assertContains(response, '&quot;obj&quot;:    &quot;newuser&quot;')
