

def testAdd(self):
    post_data = {
        'name': 'John Doe',
        'generic_inline_admin-phonenumber-content_type-object_id-TOTAL_FORMS': '1',
        'generic_inline_admin-phonenumber-content_type-object_id-INITIAL_FORMS': '0',
        'generic_inline_admin-phonenumber-content_type-object_id-MAX_NUM_FORMS': '0',
        'generic_inline_admin-phonenumber-content_type-object_id-0-id': '',
        'generic_inline_admin-phonenumber-content_type-object_id-0-phone_number': '555-555-5555',
    }
    response = self.client.get('/generic_inline_admin/admin/generic_inline_admin/contact/add/')
    self.assertEqual(response.status_code, 200)
    response = self.client.post('/generic_inline_admin/admin/generic_inline_admin/contact/add/', post_data)
    self.assertEqual(response.status_code, 302)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/generic_inline_admin/tests.py GenericInlineAdminWithUniqueTogetherTest.testAdd/original