Beispiel #1
0
def test_user_creation(admin_client: GirderClient, user: dict):
    try:
        admin_client.createUser(
            user['login'],
            user['email'],
            user['firstName'],
            user['lastName'],
            user['password'],
        )
    except HttpError as err:
        if err.response.json()['message'] != 'That login is already registered.':
            raise err
#  See the License for the specific language governing permissions and
#  limitations under the License.
###############################################################################

from girder_client import GirderClient

if __name__ == "__main__":
    login = '******'
    password = '******'

    gc = GirderClient(apiUrl='http://*****:*****@admin.com',
                  firstName='admin',
                  lastName='admin',
                  password=password,
                  admin=True)
    gc.authenticate(username=login, password=password)

    # Create an assetstore
    gc.post('assetstore',
            parameters={
                'name': 'TestAssetstore',
                'type': 0,
                'root': '/home/circleci/project/assetstore'
            })

    # Enable the 'slicer_extension_manager' plugin
    gc.put('system/plugins',
           parameters={"plugins": '["slicer_extension_manager"]'})