'Test that list projects only returns those in the default domain.'

def test_list_projects_default_domain(self):

    domain = unit.new_domain_ref()
    self.resource_api.create_domain(domain['id'], domain)
    project1 = unit.new_project_ref(domain_id=domain['id'])
    self.resource_api.create_project(project1['id'], project1)
    refs = self.resource_api.list_projects()
    self.assertThat(refs, matchers.HasLength((len(default_fixtures.TENANTS) + 3)))
    refs = self.tenant_controller.get_all_projects(self.make_request(is_admin=True))
    self.assertEqual(len(default_fixtures.TENANTS), len(refs['tenants']))
    for tenant in default_fixtures.TENANTS:
        tenant_copy = tenant.copy()
        tenant_copy.pop('domain_id')
        tenant_copy.pop('parent_id')
        tenant_copy.pop('is_domain')
        self.assertIn(tenant_copy, refs['tenants'])
