2013-11-06 22:09:22 +00:00
|
|
|
import unittest
|
2014-03-18 20:48:09 +00:00
|
|
|
import json
|
2013-11-06 22:09:22 +00:00
|
|
|
|
2014-03-25 18:53:27 +00:00
|
|
|
from urllib import urlencode
|
|
|
|
from urlparse import urlparse, urlunparse, parse_qs
|
|
|
|
|
2013-11-06 22:09:22 +00:00
|
|
|
from app import app
|
2014-01-31 01:57:40 +00:00
|
|
|
from initdb import setup_database_for_testing, finished_database_for_testing
|
2014-03-18 20:48:09 +00:00
|
|
|
from endpoints.api import api_bp, api
|
2013-11-06 22:09:22 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
from endpoints.api.team import TeamMember, TeamMemberList, OrganizationTeam
|
|
|
|
from endpoints.api.tag import RepositoryTagImages, RepositoryTag
|
|
|
|
from endpoints.api.search import FindRepositories, EntitySearch
|
|
|
|
from endpoints.api.image import RepositoryImageChanges, RepositoryImage, RepositoryImageList
|
|
|
|
from endpoints.api.build import (FileDropResource, RepositoryBuildStatus, RepositoryBuildLogs,
|
|
|
|
RepositoryBuildList)
|
2014-08-25 21:19:23 +00:00
|
|
|
from endpoints.api.robot import (UserRobotList, OrgRobot, OrgRobotList, UserRobot,
|
|
|
|
RegenerateOrgRobot, RegenerateUserRobot)
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
from endpoints.api.trigger import (BuildTriggerActivate, BuildTriggerSources, BuildTriggerSubdirs,
|
|
|
|
TriggerBuildList, ActivateBuildTrigger, BuildTrigger,
|
2014-04-03 03:33:58 +00:00
|
|
|
BuildTriggerList, BuildTriggerAnalyze)
|
2014-07-28 18:58:12 +00:00
|
|
|
from endpoints.api.repoemail import RepositoryAuthorizedEmail
|
2014-07-18 02:51:58 +00:00
|
|
|
from endpoints.api.repositorynotification import RepositoryNotification, RepositoryNotificationList
|
2014-03-18 20:48:09 +00:00
|
|
|
from endpoints.api.user import (PrivateRepositories, ConvertToOrganization, Recovery, Signout,
|
2014-09-04 18:24:20 +00:00
|
|
|
Signin, User, UserAuthorizationList, UserAuthorization, UserNotification,
|
|
|
|
VerifyUser)
|
2014-03-18 20:48:09 +00:00
|
|
|
from endpoints.api.repotoken import RepositoryToken, RepositoryTokenList
|
|
|
|
from endpoints.api.prototype import PermissionPrototype, PermissionPrototypeList
|
|
|
|
from endpoints.api.logs import UserLogs, OrgLogs, RepositoryLogs
|
|
|
|
from endpoints.api.billing import (UserInvoiceList, UserCard, UserPlan, ListPlans,
|
|
|
|
OrgnaizationInvoiceList, OrganizationCard, OrganizationPlan)
|
|
|
|
from endpoints.api.discovery import DiscoveryResource
|
|
|
|
from endpoints.api.organization import (OrganizationList, OrganizationMember,
|
|
|
|
OrgPrivateRepositories, OrgnaizationMemberList,
|
2014-03-20 19:46:13 +00:00
|
|
|
Organization, ApplicationInformation,
|
|
|
|
OrganizationApplications, OrganizationApplicationResource,
|
|
|
|
OrganizationApplicationResetClientSecret)
|
2014-03-18 20:48:09 +00:00
|
|
|
from endpoints.api.repository import RepositoryList, RepositoryVisibility, Repository
|
|
|
|
from endpoints.api.permission import (RepositoryUserPermission, RepositoryTeamPermission,
|
|
|
|
RepositoryTeamPermissionList, RepositoryUserPermissionList)
|
2013-11-06 22:09:22 +00:00
|
|
|
|
2014-08-21 23:21:20 +00:00
|
|
|
from endpoints.api.superuser import SuperUserLogs, SuperUserList, SuperUserManagement
|
2014-05-12 18:45:19 +00:00
|
|
|
|
|
|
|
|
2014-04-15 22:51:12 +00:00
|
|
|
try:
|
|
|
|
app.register_blueprint(api_bp, url_prefix='/api')
|
|
|
|
except ValueError:
|
|
|
|
# This blueprint was already registered
|
|
|
|
pass
|
2013-11-06 22:09:22 +00:00
|
|
|
|
2014-03-25 18:53:27 +00:00
|
|
|
CSRF_TOKEN_KEY = '_csrf_token'
|
|
|
|
CSRF_TOKEN = '123csrfforme'
|
|
|
|
|
|
|
|
|
2013-11-06 22:09:22 +00:00
|
|
|
class ApiTestCase(unittest.TestCase):
|
2014-03-25 18:53:27 +00:00
|
|
|
@staticmethod
|
|
|
|
def _add_csrf(without_csrf):
|
|
|
|
parts = urlparse(without_csrf)
|
|
|
|
query = parse_qs(parts[4])
|
|
|
|
query[CSRF_TOKEN_KEY] = CSRF_TOKEN
|
|
|
|
return urlunparse(list(parts[0:4]) + [urlencode(query)] + list(parts[5:]))
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def _set_url(self, resource, **url_params):
|
|
|
|
with app.test_request_context():
|
|
|
|
self.url = api.url_for(resource, **url_params)
|
|
|
|
|
|
|
|
def _run_test(self, method, expected_status, auth_username=None, request_body=None):
|
|
|
|
with app.test_client() as client:
|
2014-03-25 18:53:27 +00:00
|
|
|
# Temporarily remove the teardown functions
|
|
|
|
teardown_funcs = []
|
|
|
|
if None in app.teardown_request_funcs:
|
|
|
|
teardown_funcs = app.teardown_request_funcs[None]
|
|
|
|
app.teardown_request_funcs[None] = []
|
|
|
|
|
|
|
|
with client.session_transaction() as sess:
|
|
|
|
if auth_username:
|
2014-03-18 20:48:09 +00:00
|
|
|
sess['user_id'] = auth_username
|
2014-03-25 18:53:27 +00:00
|
|
|
sess[CSRF_TOKEN_KEY] = CSRF_TOKEN
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-03-25 18:53:27 +00:00
|
|
|
# Restore the teardown functions
|
|
|
|
app.teardown_request_funcs[None] = teardown_funcs
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
open_kwargs = {
|
|
|
|
'method': method
|
|
|
|
}
|
2014-03-25 18:53:27 +00:00
|
|
|
|
|
|
|
final_url = self.url
|
|
|
|
if method != 'GET' and method != 'HEAD':
|
|
|
|
final_url = self._add_csrf(self.url)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
open_kwargs.update({
|
|
|
|
'data': json.dumps(request_body),
|
|
|
|
'content_type': 'application/json',
|
|
|
|
})
|
2014-03-25 18:53:27 +00:00
|
|
|
|
|
|
|
rv = client.open(final_url, **open_kwargs)
|
|
|
|
msg = '%s %s: %s expected: %s' % (method, final_url, rv.status_code, expected_status)
|
2014-04-03 03:33:58 +00:00
|
|
|
if rv.status_code != expected_status:
|
|
|
|
print rv.data
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
self.assertEqual(rv.status_code, expected_status, msg)
|
|
|
|
|
2013-11-06 22:09:22 +00:00
|
|
|
def setUp(self):
|
2014-01-31 01:57:40 +00:00
|
|
|
setup_database_for_testing(self)
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
finished_database_for_testing(self)
|
2013-11-06 22:09:22 +00:00
|
|
|
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
class TestFindRepositories(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(FindRepositories)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-07-28 22:23:46 +00:00
|
|
|
|
|
|
|
class TestUserNotification(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(UserNotification, uuid='someuuid')
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 404, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 404, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
|
|
|
self._run_test('PUT', 401, None, {})
|
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 404, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 404, 'reader', {})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 404, 'devtable', {})
|
|
|
|
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
class TestUserInvoiceList(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(UserInvoiceList)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestPrivateRepositories(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(PrivateRepositories)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestConvertToOrganization(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(ConvertToOrganization)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 401, None, {u'plan': '1RB4', u'adminUser': '44E8',
|
|
|
|
u'adminPassword': 'IQTM'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'freshuser', {u'plan': '1RB4', u'adminUser': '44E8',
|
|
|
|
u'adminPassword': 'IQTM'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'reader', {u'plan': '1RB4', u'adminUser': '44E8',
|
|
|
|
u'adminPassword': 'IQTM'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'devtable', {u'plan': '1RB4', u'adminUser': '44E8',
|
|
|
|
u'adminPassword': 'IQTM'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestUserRobotList(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(UserRobotList)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestUserCard(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(UserCard)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 401, None, {u'token': 'ORH4'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestUserPlan(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(UserPlan)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'plan': '1QIK'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestUserLogs(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(UserLogs)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationList(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationList)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 401, None, {u'name': 'KSIS', u'email': 'DHVZ'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'freshuser', {u'name': 'KSIS', u'email': 'DHVZ'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'reader', {u'name': 'KSIS', u'email': 'DHVZ'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'devtable', {u'name': 'KSIS', u'email': 'DHVZ'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryList(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryList)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, None, {u'visibility': u'public', u'repository': 'XZGB',
|
|
|
|
u'description': '0O8U'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 201, 'freshuser', {u'visibility': u'public', u'repository': 'XZGB',
|
|
|
|
u'description': '0O8U'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 201, 'reader', {u'visibility': u'public', u'repository': 'XZGB',
|
|
|
|
u'description': '0O8U'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 201, 'devtable', {u'visibility': u'public', u'repository': 'XZGB',
|
|
|
|
u'description': '0O8U'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestDiscoveryResource(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(DiscoveryResource)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestFileDropResource(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(FileDropResource)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, None, {u'mimeType': 'TKBX'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, 'freshuser', {u'mimeType': 'TKBX'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, 'reader', {u'mimeType': 'TKBX'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, 'devtable', {u'mimeType': 'TKBX'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRecovery(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(Recovery)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, None, {u'email': '826S'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'freshuser', {u'email': '826S'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'reader', {u'email': '826S'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'devtable', {u'email': '826S'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestSignout(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(Signout)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestSignin(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(Signin)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, None, {u'username': 'E9RY', u'password': 'LQ0N'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'username': 'E9RY', u'password': 'LQ0N'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'username': 'E9RY', u'password': 'LQ0N'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'devtable', {u'username': 'E9RY', u'password': 'LQ0N'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-09-04 18:24:20 +00:00
|
|
|
class TestVerifyUser(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(VerifyUser)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, {u'password': 'LQ0N'})
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {u'password': 'LQ0N'})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {u'password': 'LQ0N'})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 200, 'devtable', {u'password': 'password'})
|
|
|
|
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
class TestListPlans(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(ListPlans)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2013-11-06 22:56:31 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
class TestUser(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(User)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
2014-09-04 18:24:20 +00:00
|
|
|
self._run_test('PUT', 401, 'freshuser', {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_reader(self):
|
2014-09-04 18:24:20 +00:00
|
|
|
self._run_test('PUT', 401, 'reader', {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-09-04 18:24:20 +00:00
|
|
|
self._run_test('PUT', 401, 'devtable', {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, None, {u'username': 'T946', u'password': '0SG4', u'email': 'MENT'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'freshuser', {u'username': 'T946', u'password': '0SG4',
|
|
|
|
u'email': 'MENT'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'reader', {u'username': 'T946', u'password': '0SG4',
|
|
|
|
u'email': 'MENT'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'devtable', {u'username': 'T946', u'password': '0SG4',
|
|
|
|
u'email': 'MENT'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestTeamMemberBuynlargeDevtableReaders(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(TeamMember, orgname="buynlarge", membername="devtable", teamname="readers")
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestTeamMemberBuynlargeDevtableOwners(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(TeamMember, orgname="buynlarge", membername="devtable", teamname="owners")
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestTeamMemberListBuynlargeReaders(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(TeamMemberList, orgname="buynlarge", teamname="readers")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestTeamMemberListBuynlargeOwners(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(TeamMemberList, orgname="buynlarge", teamname="owners")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryUserPermissionA2o9PublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryUserPermission, username="A2O9", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryUserPermissionA2o9DevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryUserPermission, username="A2O9", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryUserPermissionA2o9BuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryUserPermission, username="A2O9", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionReadersPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermission, teamname="readers", repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionReadersDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermission, teamname="readers", repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionReadersBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermission, teamname="readers", repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2013-11-06 22:56:31 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 200, 'devtable', {u'role': u'read'})
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2013-11-07 04:21:12 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 204, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionOwnersPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermission, teamname="owners", repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionOwnersDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermission, teamname="owners", repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionOwnersBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermission, teamname="owners", repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 200, 'devtable', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerActivateSwo1PublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerActivate, trigger_uuid="SWO1", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'devtable', {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerActivateSwo1DevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerActivate, trigger_uuid="SWO1", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-27 22:33:13 +00:00
|
|
|
self._run_test('POST', 404, 'devtable', {'config': {}})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerActivateSwo1BuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerActivate, trigger_uuid="SWO1", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-27 22:33:13 +00:00
|
|
|
self._run_test('POST', 404, 'devtable', {'config': {}})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerSources831cPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerSources, trigger_uuid="831C", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerSources831cDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerSources, trigger_uuid="831C", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerSources831cBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerSources, trigger_uuid="831C", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerSubdirs4i2yPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerSubdirs, trigger_uuid="4I2Y", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'devtable', {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerSubdirs4i2yDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerSubdirs, trigger_uuid="4I2Y", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 404, 'devtable', {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerSubdirs4i2yBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTriggerSubdirs, trigger_uuid="4I2Y", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 404, 'devtable', {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestTriggerBuildListZm1wPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(TriggerBuildList, trigger_uuid="ZM1W", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestTriggerBuildListZm1wDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(TriggerBuildList, trigger_uuid="ZM1W", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestTriggerBuildListZm1wBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(TriggerBuildList, trigger_uuid="ZM1W", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestActivateBuildTrigger0byePublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(ActivateBuildTrigger, trigger_uuid="0BYE", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestActivateBuildTrigger0byeDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(ActivateBuildTrigger, trigger_uuid="0BYE", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestActivateBuildTrigger0byeBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(ActivateBuildTrigger, trigger_uuid="0BYE", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-04-03 03:33:58 +00:00
|
|
|
class TestActivateBuildTrigger0byeDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(ActivateBuildTrigger, trigger_uuid="0BYE", repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 404, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestActivateBuildTrigger0byeBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(ActivateBuildTrigger, trigger_uuid="0BYE", repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 404, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestBuildTriggerAnalyze0byePublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(BuildTriggerAnalyze, trigger_uuid="0BYE", repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 403, 'devtable', {'config': {}})
|
|
|
|
|
|
|
|
|
|
|
|
class TestBuildTriggerAnalyze0byeDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(BuildTriggerAnalyze, trigger_uuid="0BYE", repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 404, 'devtable', {'config': {}})
|
|
|
|
|
|
|
|
|
|
|
|
class TestBuildTriggerAnalyze0byeBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(BuildTriggerAnalyze, trigger_uuid="0BYE", repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 404, 'devtable', {'config': {}})
|
|
|
|
|
|
|
|
class TestBuildTriggerAnalyze0byeDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(BuildTriggerAnalyze, trigger_uuid="0BYE", repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 404, 'devtable', {'config': {}})
|
|
|
|
|
|
|
|
|
|
|
|
class TestBuildTriggerAnalyze0byeBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(BuildTriggerAnalyze, trigger_uuid="0BYE", repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 404, 'devtable', {'config': {}})
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryImageChangesPtsgPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryImageChanges, image_id="PTSG", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryImageChangesPtsgDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryImageChanges, image_id="PTSG", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryImageChangesPtsgBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryImageChanges, image_id="PTSG", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryBuildStatusFg86PublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryBuildStatus, build_uuid="FG86", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryBuildStatusFg86DevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryBuildStatus, build_uuid="FG86", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryBuildStatusFg86BuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryBuildStatus, build_uuid="FG86", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryBuildLogsS5j8PublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryBuildLogs, build_uuid="S5J8", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryBuildLogsS5j8DevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryBuildLogs, build_uuid="S5J8", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryBuildLogsS5j8BuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryBuildLogs, build_uuid="S5J8", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTagImagesTn96PublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryTagImages, tag="TN96", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTagImagesTn96DevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryTagImages, tag="TN96", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTagImagesTn96BuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryTagImages, tag="TN96", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestPermissionPrototypeBuynlargeL24b(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(PermissionPrototype, orgname="buynlarge", prototypeid="L24B")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 404, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationMemberBuynlargeDevtable(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationMember, orgname="buynlarge", membername="devtable")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestOrgRobotBuynlargeZ7pd(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(OrgRobot, orgname="buynlarge", robot_shortname="Z7PD")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-08-25 21:19:23 +00:00
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-08-25 21:19:23 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationTeamBuynlargeReaders(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationTeam, orgname="buynlarge", teamname="readers")
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'member'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'member'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'member'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 200, 'devtable', {u'role': u'member'})
|
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 204, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationTeamBuynlargeOwners(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationTeam, orgname="buynlarge", teamname="owners")
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'member'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'member'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'member'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', {u'role': u'member'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionListPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermissionList, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionListDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermissionList, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTeamPermissionListBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTeamPermissionList, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryUserPermissionListPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryUserPermissionList, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryUserPermissionListDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryUserPermissionList, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryUserPermissionListBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryUserPermissionList, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerD6tiPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTrigger, trigger_uuid="D6TI", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerD6tiDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTrigger, trigger_uuid="D6TI", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestBuildTriggerD6tiBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(BuildTrigger, trigger_uuid="D6TI", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-07-18 02:51:58 +00:00
|
|
|
class TestRepositoryNotificationQfatPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-07-18 02:51:58 +00:00
|
|
|
self._set_url(RepositoryNotification, uuid="QFAT", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-07-18 02:51:58 +00:00
|
|
|
class TestRepositoryNotificationQfatDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-07-18 02:51:58 +00:00
|
|
|
self._set_url(RepositoryNotification, uuid="QFAT", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-07-18 02:51:58 +00:00
|
|
|
class TestRepositoryNotificationQfatBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-07-18 02:51:58 +00:00
|
|
|
self._set_url(RepositoryNotification, uuid="QFAT", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTokenUjqbPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryToken, code="UJQB", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTokenUjqbDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryToken, code="UJQB", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTokenUjqbBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryToken, code="UJQB", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'role': u'read'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 400, 'devtable', {u'role': u'read'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryImage5avqPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryImage, image_id="5AVQ", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryImage5avqDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryImage, image_id="5AVQ", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryImage5avqBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryImage, image_id="5AVQ", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTagHp8rPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryTag, tag="HP8R", repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-03-26 23:42:29 +00:00
|
|
|
def test_put_anonymous(self):
|
|
|
|
self._run_test('PUT', 401, None, {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 403, 'devtable', {u'image': 'WXNG'})
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTagHp8rDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryTag, tag="HP8R", repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-03-26 23:42:29 +00:00
|
|
|
def test_put_anonymous(self):
|
|
|
|
self._run_test('PUT', 401, None, {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 404, 'devtable', {u'image': 'WXNG'})
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestRepositoryTagHp8rBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(RepositoryTag, tag="HP8R", repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-03-26 23:42:29 +00:00
|
|
|
def test_put_anonymous(self):
|
|
|
|
self._run_test('PUT', 401, None, {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {u'image': 'WXNG'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 404, 'devtable', {u'image': 'WXNG'})
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestPermissionPrototypeListBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(PermissionPrototypeList, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'role': u'read',
|
2014-03-18 23:21:46 +00:00
|
|
|
u'delegate': {u'kind': u'user', u'name': '7DGP'}})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'role': u'read',
|
|
|
|
u'delegate': {u'kind': u'user', u'name': '7DGP'}})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'role': u'read',
|
|
|
|
u'delegate': {u'kind': u'user', u'name': '7DGP'}})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 400, 'devtable', {u'role': u'read',
|
|
|
|
u'delegate': {u'kind': u'user', u'name': '7DGP'}})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestOrgnaizationInvoiceListBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrgnaizationInvoiceList, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestOrgPrivateRepositoriesBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrgPrivateRepositories, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestOrgnaizationMemberListBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrgnaizationMemberList, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestOrgRobotListBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrgRobotList, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationCardBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationCard, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'token': '4VFR'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'token': '4VFR'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'token': '4VFR'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationPlanBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationPlan, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'plan': 'WWEI'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'plan': 'WWEI'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'reader', {u'plan': 'WWEI'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestOrgLogsBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrgLogs, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryVisibilityPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryVisibility, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'visibility': u'public'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {u'visibility': u'public'})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {u'visibility': u'public'})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'devtable', {u'visibility': u'public'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryVisibilityDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryVisibility, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'visibility': u'public'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {u'visibility': u'public'})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {u'visibility': u'public'})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, 'devtable', {u'visibility': u'public'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryVisibilityBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryVisibility, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'visibility': u'public'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {u'visibility': u'public'})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {u'visibility': u'public'})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 200, 'devtable', {u'visibility': u'public'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestBuildTriggerListPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(BuildTriggerList, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestBuildTriggerListDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(BuildTriggerList, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestBuildTriggerListBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(BuildTriggerList, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-07-18 02:51:58 +00:00
|
|
|
class TestRepositoryNotificationListPublicPublicrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-07-18 02:51:58 +00:00
|
|
|
self._set_url(RepositoryNotificationList, repository="public/publicrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'devtable', {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-07-18 02:51:58 +00:00
|
|
|
class TestRepositoryNotificationListDevtableShared(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-07-18 02:51:58 +00:00
|
|
|
self._set_url(RepositoryNotificationList, repository="devtable/shared")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-07-28 18:58:12 +00:00
|
|
|
self._run_test('POST', 400, 'devtable', {'event': 'repo_push', 'method': 'email',
|
|
|
|
'config': {'email': 'a@b.com'}})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-07-18 02:51:58 +00:00
|
|
|
class TestRepositoryNotificationListBuynlargeOrgrepo(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-07-18 02:51:58 +00:00
|
|
|
self._set_url(RepositoryNotificationList, repository="buynlarge/orgrepo")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-07-28 18:58:12 +00:00
|
|
|
self._run_test('POST', 400, 'devtable', {'event': 'repo_push', 'method': 'email',
|
|
|
|
'config': {'email': 'a@b.com'}})
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryAuthorizedEmailPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryAuthorizedEmail, repository="public/publicrepo",
|
|
|
|
email="jschorr@devtable.com")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, {})
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 403, 'devtable', {})
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryAuthorizedEmailDevtableSharedrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryAuthorizedEmail, repository="devtable/shared",
|
|
|
|
email="jschorr@devtable.com")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, {})
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 200, 'devtable', {})
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryAuthorizedEmailBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryAuthorizedEmail, repository="buynlarge/orgrepo",
|
|
|
|
email="jschorr@devtable.com")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, {})
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 200, 'devtable', {})
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTokenListPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTokenList, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'devtable', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTokenListDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTokenList, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 201, 'devtable', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryTokenListBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryTokenList, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 201, 'devtable', {u'friendlyName': 'R1CN'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryBuildListPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryBuildList, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'devtable', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryBuildListDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryBuildList, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 201, 'devtable', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryBuildListBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryBuildList, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('POST', 401, None, {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'freshuser', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 403, 'reader', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_post_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('POST', 201, 'devtable', {u'file_id': 'UX7K'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryImageListPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryImageList, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryImageListDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryImageList, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryImageListBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryImageList, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryLogsPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryLogs, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryLogsDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryLogs, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryLogsBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RepositoryLogs, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestUserRobot5vdy(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(UserRobot, robot_shortname="robotname")
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-08-25 21:19:23 +00:00
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 400, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 400, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_put_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 201, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 201, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 201, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
2014-08-25 21:19:23 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_delete_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 400, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 400, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-08-25 21:19:23 +00:00
|
|
|
class TestRegenerateUserRobot(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RegenerateUserRobot, robot_shortname="robotname")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 400, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 400, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestRegenerateOrgRobot(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(RegenerateOrgRobot, orgname="buynlarge", robot_shortname="robotname")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 400, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
class TestOrganizationBuynlarge(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(Organization, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 200, 'devtable', {})
|
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryPublicPublicrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(Repository, repository="public/publicrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'reader', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'devtable', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 403, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryDevtableShared(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(Repository, repository="devtable/shared")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'reader', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 200, 'devtable', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 204, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestRepositoryBuynlargeOrgrepo(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(Repository, repository="buynlarge/orgrepo")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('GET', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('PUT', 401, None, {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'freshuser', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 403, 'reader', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_put_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('PUT', 200, 'devtable', {u'description': 'WXNG'})
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
2014-03-19 17:57:36 +00:00
|
|
|
self._run_test('DELETE', 401, None, None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('DELETE', 204, 'devtable', None)
|
2014-03-18 20:48:09 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestEntitySearchR9nz(ApiTestCase):
|
2014-03-18 20:48:09 +00:00
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
2014-03-18 23:21:46 +00:00
|
|
|
self._set_url(EntitySearch, prefix="R9NZ")
|
2013-11-06 22:56:31 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_get_anonymous(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, None, None)
|
2013-11-06 22:56:31 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_get_freshuser(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
2013-11-06 22:56:31 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_get_reader(self):
|
2014-03-18 23:21:46 +00:00
|
|
|
self._run_test('GET', 200, 'reader', None)
|
2013-11-06 22:09:22 +00:00
|
|
|
|
2014-03-18 20:48:09 +00:00
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
2013-11-07 17:54:44 +00:00
|
|
|
|
|
|
|
|
2014-03-18 23:21:46 +00:00
|
|
|
class TestApplicationInformation3lgi(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(ApplicationInformation, client_id="3LGI")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 404, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 404, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 404, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
2014-03-20 19:46:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationApplications(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationApplications, orgname="buynlarge")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, {u'name': 'foo'})
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', {u'name': 'foo'})
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', {u'name': 'foo'})
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 200, 'devtable', {u'name': 'foo'})
|
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationApplicationResource(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationApplicationResource, orgname="buynlarge", client_id="deadbeef")
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
|
|
|
self._run_test('PUT', 401, None,
|
|
|
|
{u'name': 'foo', u'application_uri': 'foo', u'redirect_uri': 'foo'})
|
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser',
|
|
|
|
{u'name': 'foo', u'application_uri': 'foo', u'redirect_uri': 'foo'})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader',
|
|
|
|
{u'name': 'foo', u'application_uri': 'foo', u'redirect_uri': 'foo'})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 200, 'devtable',
|
|
|
|
{u'name': 'foo', u'application_uri': 'foo', u'redirect_uri': 'foo'})
|
|
|
|
|
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
|
|
|
self._run_test('DELETE', 401, None, None)
|
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 204, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestOrganizationApplicationResetClientSecret(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(OrganizationApplicationResetClientSecret,
|
|
|
|
orgname="buynlarge", client_id="deadbeef")
|
|
|
|
|
|
|
|
def test_post_anonymous(self):
|
|
|
|
self._run_test('POST', 401, None, None)
|
|
|
|
|
|
|
|
def test_post_freshuser(self):
|
|
|
|
self._run_test('POST', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_post_reader(self):
|
|
|
|
self._run_test('POST', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_post_devtable(self):
|
|
|
|
self._run_test('POST', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-03-25 00:57:02 +00:00
|
|
|
|
|
|
|
class TestUserAuthorizationList(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(UserAuthorizationList)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 200, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 200, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestUserAuthorization(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(UserAuthorization, access_token_uuid='fake')
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 401, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 404, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 404, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 404, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
|
|
|
self._run_test('DELETE', 401, None, None)
|
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 404, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 404, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 404, 'devtable', None)
|
|
|
|
|
|
|
|
|
2014-05-12 18:45:19 +00:00
|
|
|
class TestSuperUserLogs(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(SuperUserLogs)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 403, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
class TestSuperUserList(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(SuperUserList)
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 403, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestSuperUserManagement(ApiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
ApiTestCase.setUp(self)
|
|
|
|
self._set_url(SuperUserManagement, username='freshuser')
|
|
|
|
|
|
|
|
def test_get_anonymous(self):
|
|
|
|
self._run_test('GET', 403, None, None)
|
|
|
|
|
|
|
|
def test_get_freshuser(self):
|
|
|
|
self._run_test('GET', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_get_reader(self):
|
|
|
|
self._run_test('GET', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_get_devtable(self):
|
|
|
|
self._run_test('GET', 200, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
def test_put_anonymous(self):
|
|
|
|
self._run_test('PUT', 403, None, {})
|
|
|
|
|
|
|
|
def test_put_freshuser(self):
|
|
|
|
self._run_test('PUT', 403, 'freshuser', {})
|
|
|
|
|
|
|
|
def test_put_reader(self):
|
|
|
|
self._run_test('PUT', 403, 'reader', {})
|
|
|
|
|
|
|
|
def test_put_devtable(self):
|
|
|
|
self._run_test('PUT', 200, 'devtable', {})
|
|
|
|
|
|
|
|
|
|
|
|
def test_delete_anonymous(self):
|
|
|
|
self._run_test('DELETE', 403, None, None)
|
|
|
|
|
|
|
|
def test_delete_freshuser(self):
|
|
|
|
self._run_test('DELETE', 403, 'freshuser', None)
|
|
|
|
|
|
|
|
def test_delete_reader(self):
|
|
|
|
self._run_test('DELETE', 403, 'reader', None)
|
|
|
|
|
|
|
|
def test_delete_devtable(self):
|
|
|
|
self._run_test('DELETE', 204, 'devtable', None)
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-20 19:46:13 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|