moe.tests.views package

Submodules

moe.tests.views.exceptions_test module

Various tests for checking exceptions in views.

class moe.tests.views.exceptions_test.TestRestGaussianProcessWithExceptions[source]

Bases: moe.tests.optimal_learning.python.gaussian_process_test_case.GaussianProcessTestCase, moe.tests.views.rest_test_case.RestTestCase

Test that proper errors are thrown when endpoints bad data.

test_badly_formed_json_payload_invalid()[source]

Test malformed json payload causes a ValueError.

test_empty_json_payload_invalid()[source]

Test empty json payload causes an AppError.

test_invalid_hyperparameters_input()[source]

Test that invalid hyperparameters (via GP_MEAN_VAR_ENDPOINT) generate expected Response with error message.

test_invalid_points_sampled_input()[source]

Test that duplicate points_sampled (via GP_NEXT_POINTS_EPI_ENDPOINT) generate expected Response with error message.

moe.tests.views.exceptions_test.disable_logging(request)[source]

Disable logging (for the duration of this test case).

moe.tests.views.rest_test_case module

Base class for testing the REST interface against the C++ interface.

class moe.tests.views.rest_test_case.RestTestCase[source]

Bases: object

Base class for testing the REST interface against the C++ interface.

classmethod create_webapp()[source]

Create a mocked webapp and store it in cls.testapp.

endpoint = None

moe.tests.views.utils_test module

Tests for functions in utils.

class moe.tests.views.utils_test.TestUtils[source]

Bases: moe.tests.bandit.bandit_test_case.BanditTestCase

Tests moe.views.utils._make_bandit_historical_info_from_params().

make_params_from_bandit_historical_info(historical_info)[source]

Create params from given historical_info.

test_make_bandit_historical_info_from_params_make_bernoulli_arms()[source]

Test that the function can make historical infos with Bernoulli arms.

test_make_bandit_historical_info_from_params_variance_passed_through()[source]

Test that the variance of a given sample arm got passed through.

Module contents

Views tests.