Fix imports, __all__ definition, organization/team sublists under projects.

This commit is contained in:
Chris Church
2013-07-20 19:59:53 -04:00
parent a6c767907e
commit 6fda31e790
8 changed files with 36 additions and 34 deletions
+1
View File
@@ -10,6 +10,7 @@ import tempfile
# Django
from django.conf import settings
from django.contrib.auth.models import User
from django.core.management import call_command
from django.core.management.base import CommandError
from django.utils.timezone import now
+1 -1
View File
@@ -4,7 +4,7 @@
import datetime
import json
from django.contrib.auth.models import User as DjangoUser
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from awx.main.models import *
from awx.main.tests.base import BaseTest
+1
View File
@@ -10,6 +10,7 @@ import uuid
# Django
from django.contrib.auth.models import User as DjangoUser
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import transaction
import django.test
+2 -4
View File
@@ -7,7 +7,7 @@ import os
import tempfile
from django.conf import settings
from django.contrib.auth.models import User as DjangoUser
from django.contrib.auth.models import User
import django.test
from django.test.client import Client
from django.core.urlresolvers import reverse
@@ -254,10 +254,8 @@ class ProjectsTest(BaseTest):
got = self.get(proj_orgs, expect=200, auth=self.get_super_credentials())
self.assertEquals(got['count'], 1)
self.assertEquals(got['results'][0]['url'], reverse('main:organization_detail', args=(self.organizations[0].pk,)))
# you can't add organizations to projects here, verify that this is true (405)
#self.post(proj_orgs, data={}, expect=405, auth=self.get_super_credentials())
# yes you can post now.
# post to create new org associated with this project.
self.post(proj_orgs, data={'name': 'New Org'}, expect=201, auth=self.get_super_credentials())
got = self.get(proj_orgs, expect=200, auth=self.get_super_credentials())
self.assertEquals(got['count'], 2)
+1 -1
View File
@@ -3,7 +3,7 @@
import json
from django.contrib.auth.models import User as DjangoUser
from django.contrib.auth.models import User
import django.test
from django.test.client import Client
from django.core.urlresolvers import reverse