test

class RequestTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

HOST = 'http://localhost:4000'
assertHTTPCode(path, code=200, method='get', *args, **kwargs)[source]
cookies
destroySession()[source]
get(path, *args, **kwargs)[source]
getUrl(path)[source]
login_user(user)[source]
newSession()[source]
post(path, *args, **kwargs)[source]
session
class TestAdminAccess(methodName='runTest')[source]

Bases: backend.test.RequestTests

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_admin_is_admin()[source]
test_admin_list_users()[source]
test_admin_list_users_get_data()[source]
test_admin_list_users_only_own_project_1()[source]
test_admin_list_users_only_own_project_2()[source]
test_login_admin()[source]
class TestEndpoints(methodName='runTest')[source]

Bases: backend.test.RequestTests

test_dataset_collection()[source]
test_datasets()[source]
test_get_one_version()[source]
test_get_users_current()[source]
test_get_users_pending()[source]
test_get_versions()[source]
test_list_files()[source]
test_one_dataset()[source]
test_request_access()[source]
test_user_datasets()[source]
test_user_me()[source]
class TestLoggedInUser(methodName='runTest')[source]

Bases: backend.test.RequestTests

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

testLoggedInFiles()[source]
testLoggedInTempLinkGet()[source]
testLoggedInTempLinkPost()[source]
testLoggedInTempLinkPostXSRF1()[source]
testLoggedInTempLinkPostXSRF2()[source]
class TestRequestAccess(methodName='runTest')[source]

Bases: backend.test.RequestTests

USER = 'e1'
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_get_xsrf_token()[source]
test_login()[source]
test_request_access_correctly()[source]
test_request_access_with_get()[source]
test_request_access_with_wrong_xsrf_1()[source]
test_request_access_with_wrong_xsrf_2()[source]
test_request_access_without_xsrf()[source]
class TestUserManagement(methodName='runTest')[source]

Bases: backend.test.RequestTests

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_admin_approve_user()[source]
test_full_user_roundabout()[source]
test_recently_approved_user_can_list_files()[source]
test_recently_revoked_user_cant_list_files()[source]