def create_app(self):
        app.config.update({'TESTING': True})
        self.client = app.test_client()
        self.new_tenant = {
            'aps': {
                'type': 'http://new.app',
                'id': '123-123-123'
            }
        }
        self.oa_user = {'email': '*****@*****.**', 'isAccountAdmin': True}
        self.user_service = {
            'aps': {
                'type': 'http://new.app/user-service/1.0'
            },
            'tenant': {
                'aps': {
                    'id': '123'
                }
            },
            'userId': '*****@*****.**',
            'user': {
                'aps': {
                    'id': '123'
                }
            }
        }
        self.headers = {
            'Content-type': 'application/json',
            'aps-instance-id': '123-123-123',
            'aps-controller-uri': 'https://localhost'
        }

        return app
Example #2
0
    def create_app(self):
        app.config.update({'TESTING': True})
        self.client = app.test_client()
        self.new_app = json.dumps(
            {'aps': {
                'type': 'http://new.app',
                'id': '123-123-123'
            }})
        self.headers = {
            'Content-type': 'application/json',
            'aps-instance-id': '123-123-123',
            'aps-controller-uri': 'https://aps.com'
        }

        return app
    def create_app(self):
        app.config.update({'TESTING': True})
        self.client = app.test_client()
        self.headers = {
            'Content-type': 'application/json',
            'aps-instance-id': '123-123-123',
            'aps-identity-id': '123-123-123',
            'aps-controller-uri': 'https://localhost'
        }
        self.new_tenant = json.dumps({
            'aps': {
                'type': 'http://new.app',
                'id': '123-123-123'
            },
            config.diskspace_resource: {
                'limit': 1000
            },
            'oaSubscription': {
                'aps': {
                    'id': 555
                }
            },
            'oaAccount': {
                'aps': {
                    'id': 555
                }
            }
        })
        self.diskless_tenant = json.dumps({
            'aps': {
                'type': 'http://new.app',
                'id': '123-123-123'
            },
            'oaSubscription': {
                'aps': {
                    'id': 555
                }
            },
            'oaAccount': {
                'aps': {
                    'id': 555
                }
            }
        })

        return app
Example #4
0
    def create_app(self):
        app.config.update({'TESTING': True})
        self.client = app.test_client()
        self.new_tenant = {'aps': {'type': 'http://new.app', 'id': '123-123-123'}}
        self.oa_user = {'email': '*****@*****.**', 'login': '******',
                        'isAccountAdmin': True, 'displayName': 'User Name', 'aps': {'id': '123'}}
        self.oa_user_no_email = {'login': '******', 'isAccountAdmin': True,
                                 'displayName': 'User Name', 'aps': {'id': '123'}}
        self.user_service = {'aps': {'type': 'http://new.app/user-service/1.0'},
                             'tenant': {'aps': {'id': '123'}},
                             'userId': '3c9ed599-cd79-4222-beb0-be83f9dc8078',
                             'user': {'aps': {'id': '123'}},
                             'resource': 'USERS'
                             }
        self.headers = {'Content-type': 'application/json',
                        'aps-instance-id': '123-123-123',
                        'aps-controller-uri': 'https://localhost'}

        return app
Example #5
0
    def create_app(self):
        app.config.update({'TESTING': True})
        self.client = app.test_client()
        self.headers = {
            'Content-type': 'application/json',
            'aps-instance-id': '123-123-123',
            'aps-identity-id': '123-123-123',
            'aps-controller-uri': 'https://localhost'
        }
        self.new_tenant = \
            json.dumps({'aps': {'type': 'http://new.app', 'id': '123-123-123',
                                'status': 'aps:provisioning',
                                'subscription': '555'},
                        config.diskspace_resource: {'limit': 1000},
                        'COUNTRY': {'limit': 0},
                        'ENVIRONMENT': {'limit': 0},
                        'accountInfo': {'addressPostal': {'postalCode': '11111'}},
                        'account': {'aps': {'id': 555}}})
        self.new_tenant_no_params = \
            json.dumps({'aps': {'type': 'http://new.app', 'id': '123-123-123',
                                'status': 'aps:provisioning',
                                'subscription': '555'},
                        config.diskspace_resource: {'limit': 1000},
                        'accountInfo': {'addressPostal': {'postalCode': '11111'}},
                        'account': {'aps': {'id': 555}}})
        self.new_tenant_no_email = \
            json.dumps({'aps': {'type': 'http://new.app', 'id': '123-123-123',
                                'status': 'aps:provisioning',
                                'subscription': '555'},
                        'COUNTRY': {'limit': 0},
                        'ENVIRONMENT': {'limit': 0},
                        config.diskspace_resource: {'limit': 1000},
                        'accountInfo': {'techContact': {}},
                        'account': {'aps': {'id': 555}}})
        self.fb_client_with_users = \
            json.dumps({'aps': {'type': 'http://new.app', 'id': '123-123-123',
                                'status': 'aps:provisioning',
                                'subscription': '555'},
                        'USERS': {'limit': 10},
                        'accountInfo': {'addressPostal': {'postalCode': '11111'}},
                        'account': {'aps': {'id': 555}}})
        self.diskless_tenant = \
            json.dumps({'aps': {'type': 'http://new.app', 'id': '123-123-123',
                                'status': 'aps:provisioning',
                                'subscription': '555'},
                        'COUNTRY': {'limit': 0},
                        'ENVIRONMENT': {'limit': 0},
                        'accountInfo': {'addressPostal': {'postalCode': '11111'}},
                        'account': {'aps': {'id': 555}}})
        self.reprovisioning_tenant = \
            json.dumps({'aps': {'type': 'http://new.app', 'id': '123-123-123',
                                'status': 'aps:provisioning',
                                'subscription': '555'},
                        'COUNTRY': {'limit': 0},
                        'ENVIRONMENT': {'limit': 0},
                        'accountInfo': {'addressPostal': {'postalCode': '11111'}},
                        'status': 'activationRequired',
                        'account': {'aps': {'id': 555}}})
        self.reprovisioned_tenant = \
            json.dumps({'aps': {'type': 'http://new.app', 'id': '123-123-123',
                                'status': 'aps:ready',
                                'subscription': '555'},
                        'COUNTRY': {'limit': 0},
                        'ENVIRONMENT': {'limit': 0},
                        'accountInfo': {'addressPostal': {'postalCode': '11111'}},
                        'status': 'reprovisioned',
                        'account': {'aps': {'id': 555}}})
        self.users_changed_notification = '{}'

        return app