예제 #1
0
class TestStatisticsResponse(AbstractResponse):
    """Returns statistics of a test."""
    PROPERTIES = [
        NumberField(name="min", required=True),
        NumberField(name="avg", required=True),
        NumberField(name="max", required=True)
    ]
예제 #2
0
파일: models.py 프로젝트: gregoil/rotest
class StatisticsRequestModel(AbstractAPIModel):
    """Model that contains name of a test or component."""
    PROPERTIES = [
        StringField(name="test_name", required=True),
        NumberField(name="max_sample_size", required=False),
        NumberField(name="min_duration_cut", required=False),
        NumberField(name="max_iterations", required=False),
        NumberField(name="acceptable_ratio", required=False)
    ]
예제 #3
0
class SignatureResponse(AbstractResponse):
    """Returns in response to get or create signature data action.

    The response contains data of a matching signature if there is one.
    """
    PROPERTIES = [
        BoolField(name="is_new", required=True),
        NumberField(name="id", required=True),
        StringField(name="link", required=True)
    ]
예제 #4
0
파일: models.py 프로젝트: gregoil/rotest
class TestResultModel(AbstractAPIModel):
    """Describes the result of a test.

    Args:
        result_code (number): the end result code of the test.
        info (str): additional info of the test run.
    """
    PROPERTIES = [
        NumberField(name="result_code", required=True),
        StringField(name="info", required=True)
    ]
예제 #5
0
파일: models.py 프로젝트: gregoil/rotest
class TestControlOperationParamsModel(AbstractAPIModel):
    """Generic data structure of test control operations.

    Args:
        token (str): the session token of the current test run.
        test_id (number): the relevant test to be influenced by the operation.
    """
    PROPERTIES = [
        StringField(name="token", required=True, location="query"),
        NumberField(name="test_id", required=True, location="query")
    ]
예제 #6
0
파일: models.py 프로젝트: gregoil/rotest
class TestModel(AbstractAPIModel):
    """Test model structure.

    Args:
        id (number): the id of the test.
        name (str): the name of the test.
        class (str): the classname of the test.
        subtests (list): list of TestModel. Sub-tests of the current test.
    """
    TITLE = "Test"
    PROPERTIES = [
        NumberField(name="id"),
        StringField(name="name"),
        StringField(name="class"),
        ArrayField(name="subtests",
                   items_type=DynamicType("TestModel",
                                          "rotest.api.common.models"))
    ]