Example #1
0
def user_bob(user_bob_id):
    return passive_credentials_auth(
        get_jwt(username='******',
                sub=user_bob_id,
                organization_id=ORGANIZATION_BOB_ID,
                organization_name=ORGANIZATION2_NAME
                ))
Example #2
0
    def setUp(self):
        self.client = APIClient()

        self.user_1 = passive_credentials_auth(
            get_jwt(username='******'))

        self.create_shipment()
Example #3
0
def user_gtx_alice(user_alice_id):
    return passive_credentials_auth(
        get_jwt(username='******',
                sub=user_alice_id,
                organization_id=ORGANIZATION_ALICE_ID,
                permissions=GTX_PERMISSIONS,
                features={'gtx': ['shipment_use']}
                ))
Example #4
0
def user_alice(user_alice_id):
    return passive_credentials_auth(
        get_jwt(
            username='******',
            sub=user_alice_id,
            organization_id=ORGANIZATION_ALICE_ID,
            organization_name=ORGANIZATION_NAME,
            permissions=BASE_PERMISSIONS
        ))
    def setUp(self):
        self.client = APIClient()

        self.user_1 = passive_credentials_auth(
            get_jwt(username='******', sub=OWNER_ID))
        self.user_2 = passive_credentials_auth(
            get_jwt(username='******'))

        self.s3 = settings.S3_RESOURCE

        for bucket in self.s3.buckets.all():
            for key in bucket.objects.all():
                key.delete()
            bucket.delete()

        try:
            self.s3.create_bucket(Bucket=settings.SHIPMENT_IMPORTS_BUCKET)
        except Exception as exc:
            pass
Example #6
0
def user_carol(user_carol_id):
    return passive_credentials_auth(
        get_jwt(
            username='******',
            sub=user_carol_id,
            organization_id=ORGANIZATION_ALICE_ID,
            organization_name=ORGANIZATION_NAME,
            permissions=BASE_PERMISSIONS,
            background_data_hash_interval=25,
            manual_update_hash_interval=30,
        ))
Example #7
0
def shipper_user():
    return passive_credentials_auth(get_jwt(username='******', sub=SHIPPER_ID))
Example #8
0
def user_lionel(user_lionel_id):
    return passive_credentials_auth(get_jwt(username='******', sub=user_lionel_id))