Column name not unique and assorted work on credentials REST

This commit is contained in:
Michael DeHaan
2013-04-04 12:07:12 -04:00
parent b20a29b458
commit d1f2f871e7
4 changed files with 283 additions and 6 deletions

View File

@@ -282,6 +282,10 @@ class ProjectsTest(BaseTest):
other_creds = '/api/v1/users/%s/credentials/' % other.pk
team_creds = '/api/v1/teams/%s/credentials/' % team.pk
print "ORGS=%s", other.organizations.all()
for x in other.organizations.all():
print x.admins.all()
new_credentials = dict(
name = 'credential',
project = Project.objects.all()[0].pk,
@@ -296,6 +300,7 @@ class ProjectsTest(BaseTest):
self.post(other_creds, data=new_credentials, expect=401)
self.post(other_creds, data=new_credentials, expect=401, auth=self.get_invalid_credentials())
self.post(other_creds, data=new_credentials, expect=201, auth=self.get_super_credentials())
print "TEST NOW"
self.post(other_creds, data=new_credentials, expect=201, auth=self.get_normal_credentials())
self.post(other_creds, data=new_credentials, expect=201, auth=self.get_other_credentials())
self.post(other_creds, data=new_credentials, expect=403, auth=self.get_nobody_credentials())