Esempio n. 1
0
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------

    try:
        from slot_booking.views.get_list_of_washing_machine_details.tests.test_case_01 \
            import TEST_CASE as test_case
    except ImportError:
        from slot_booking.views.get_list_of_washing_machine_details.tests.test_case_01 \
            import test_case

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        from slot_booking.views.get_list_of_washing_machine_details.request_response_mocks \
            import RESPONSE_200_JSON
    except ImportError:
        RESPONSE_200_JSON = ''
    response_tuple = mock_response(
        app_name="slot_booking",
        test_case=test_case,
        operation_name="get_list_of_washing_machine_details",
        kwargs=kwargs,
        default_response_body=RESPONSE_200_JSON,
        group_name="")
    return response_tuple
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------

    try:
        from essentials_kit_management.views.get_user_transactions_tracks.tests.test_case_01 \
            import TEST_CASE as test_case
    except ImportError:
        from essentials_kit_management.views.get_user_transactions_tracks.tests.test_case_01 \
            import test_case

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        from essentials_kit_management.views.get_user_transactions_tracks.request_response_mocks \
            import RESPONSE_200_JSON
    except ImportError:
        RESPONSE_200_JSON = ''
    response_tuple = mock_response(
        app_name="essentials_kit_management",
        test_case=test_case,
        operation_name="get_user_transactions_tracks",
        kwargs=kwargs,
        default_response_body=RESPONSE_200_JSON,
        group_name="")
    return response_tuple[1]
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------

    try:
        from fb_post_v2.views.get_reaction_metrics_of_a_post.tests.test_case_01 \
            import TEST_CASE as test_case
    except ImportError:
        from fb_post_v2.views.get_reaction_metrics_of_a_post.tests.test_case_01 \
            import test_case

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        from fb_post_v2.views.get_reaction_metrics_of_a_post.request_response_mocks \
            import RESPONSE_200_JSON
    except ImportError:
        RESPONSE_200_JSON = ''
    response_tuple = mock_response(
        app_name="fb_post_v2",
        test_case=test_case,
        operation_name="get_reaction_metrics_of_a_post",
        kwargs=kwargs,
        default_response_body=RESPONSE_200_JSON,
        group_name="")
    return response_tuple[1]
Esempio n. 4
0
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------

    try:
        from gyaan.views.get_domain_posts.request_response_mocks \
            import REQUEST_BODY_JSON
        body = REQUEST_BODY_JSON
    except ImportError:
        body = {}

    test_case = {
        "path_params": {
            'domain_id': 581
        },
        "query_params": {
            'limit': 982,
            'offset': 664
        },
        "header_params": {},
        "body": body,
        "securities": [{
            'oauth': ['read']
        }]
    }

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        response = ''
        status_code = 200
        if '200' in ['200', '404', '400']:
            from gyaan.views.get_domain_posts.request_response_mocks \
                import RESPONSE_200_JSON
            response = RESPONSE_200_JSON
            status_code = 200
        elif '201' in ['200', '404', '400']:
            from gyaan.views.get_domain_posts.request_response_mocks \
                import RESPONSE_201_JSON
            response = RESPONSE_201_JSON
            status_code = 201
    except ImportError:
        response = ''
        status_code = 200
    response_tuple = mock_response(app_name="gyaan",
                                   test_case=test_case,
                                   operation_name="get_domain_posts",
                                   kwargs=kwargs,
                                   default_response_body=response,
                                   group_name="",
                                   status_code=status_code)
    return response_tuple
Esempio n. 5
0
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------

    try:
        from lets_ride.views.get_share_ride_details.request_response_mocks \
            import REQUEST_BODY_JSON
        body = REQUEST_BODY_JSON
    except ImportError:
        body = {}

    test_case = {
        "path_params": {},
        "query_params": {},
        "header_params": {},
        "body": body,
        "securities": [{
            'oauth': ['superuser']
        }]
    }

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        response = ''
        status_code = 200
        if '200' in ['200']:
            from lets_ride.views.get_share_ride_details.request_response_mocks \
                import RESPONSE_200_JSON
            response = RESPONSE_200_JSON
            status_code = 200
        elif '201' in ['200']:
            from lets_ride.views.get_share_ride_details.request_response_mocks \
                import RESPONSE_201_JSON
            response = RESPONSE_201_JSON
            status_code = 201
    except ImportError:
        response = ''
        status_code = 200
    response_tuple = mock_response(app_name="lets_ride",
                                   test_case=test_case,
                                   operation_name="get_share_ride_details",
                                   kwargs=kwargs,
                                   default_response_body=response,
                                   group_name="",
                                   status_code=status_code)
    return response_tuple
Esempio n. 6
0
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------
    try:
        from tdd_wallet.views.credit_amount.tests.test_case_01 \
            import TEST_CASE as test_case
    except ImportError:
        from tdd_wallet.views.credit_amount.tests.test_case_01 \
            import test_case

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        from tdd_wallet.views.credit_amount.request_response_mocks \
            import RESPONSE_200_JSON
    except ImportError:
        RESPONSE_200_JSON = ''
    response_tuple = mock_response(app_name="tdd_wallet",
                                   test_case=test_case,
                                   operation_name="credit_amount",
                                   kwargs=kwargs,
                                   default_response_body=RESPONSE_200_JSON)
    return response_tuple[1]
Esempio n. 7
0
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------
    try:
        from lets_ride.views.update_user_profile.tests.test_case_01 \
            import TEST_CASE as test_case
    except ImportError:
        from lets_ride.views.update_user_profile.tests.test_case_01 \
            import test_case

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        from lets_ride.views.update_user_profile.request_response_mocks \
            import RESPONSE_200_JSON
    except ImportError:
        RESPONSE_200_JSON = ''
    response_tuple = mock_response(app_name="lets_ride",
                                   test_case=test_case,
                                   operation_name="update_user_profile",
                                   kwargs=kwargs,
                                   default_response_body=RESPONSE_200_JSON,
                                   group_name="")
    return response_tuple[1]
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------

    try:
        from project_management_portal.views.creating_a_transition.tests.test_case_01 \
            import TEST_CASE as test_case
    except ImportError:
        from project_management_portal.views.creating_a_transition.tests.test_case_01 \
            import test_case

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        from project_management_portal.views.creating_a_transition.request_response_mocks \
            import RESPONSE_200_JSON
    except ImportError:
        RESPONSE_200_JSON = ''
    response_tuple = mock_response(
        app_name="project_management_portal", test_case=test_case,
        operation_name="creating_a_transition",
        kwargs=kwargs, default_response_body=RESPONSE_200_JSON,
        group_name="")
    return response_tuple[1]
def api_wrapper(*args, **kwargs):
    # ---------MOCK IMPLEMENTATION---------

    try:
        from covid_dashboard_auth.views.get_user_login_details.tests.test_case_01 \
            import TEST_CASE as test_case
    except ImportError:
        from covid_dashboard_auth.views.get_user_login_details.tests.test_case_01 \
            import test_case

    from django_swagger_utils.drf_server.utils.server_gen.mock_response \
        import mock_response
    try:
        from covid_dashboard_auth.views.get_user_login_details.request_response_mocks \
            import RESPONSE_200_JSON
    except ImportError:
        RESPONSE_200_JSON = ''
    response_tuple = mock_response(app_name="covid_dashboard_auth",
                                   test_case=test_case,
                                   operation_name="get_user_login_details",
                                   kwargs=kwargs,
                                   default_response_body=RESPONSE_200_JSON,
                                   group_name="")
    return response_tuple[1]