def test_create_with_organization(self):
        with client.test_mode as t:
            t.register_json('/projects/', {'count': 0, 'results': [],
                            'next': None, 'previous': None},
                            method='GET')
            t.register_json('/projects/', {'id': 42}, method='POST')
            # The org endpoint can be used to lookup org pk given org name
            t.register_json('/organizations/1/', {'id': 1}, method='GET')
            # This is an endpoint used for project-org association
            t.register_json(
                '/organizations/1/projects/', {'count': 0}, method='GET'
            )
            t.register_json(
                '/organizations/1/projects/', {'changed': True}, method='POST'
            )
            result = self.res.create(
                name='bar', organization=1, scm_type="git"
            )
            self.assertEqual(t.requests[0].method, 'GET')
            self.assertEqual(t.requests[-1].method, 'POST')
            self.assertDictContainsSubset({'id': 42}, result)
Establish that a project can be created inside of an organization.
dataset/ETHPy150Open ansible/tower-cli/tests/test_resources_project.py/CreateTests.test_create_with_organization