Module ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore ListLoad Str ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Num Assign AttributeStore NameLoad attr Dict Str Dict Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Call NameLoad Assign AttributeStore NameLoad attr Dict Str Dict Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Dict Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign AttributeStore NameLoad attr Dict Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict keyword ListLoad Call NameLoad keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Assign AttributeStore NameLoad attr Dict Str Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str NameLoad keyword ListLoad Call NameLoad keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str NameLoad keyword ListLoad Call NameLoad keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str keyword ListLoad Call NameLoad keyword Str keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str Str Str keyword ListLoad Call NameLoad keyword Str keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str Str Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str Str Num keyword ListLoad Call NameLoad keyword Str keyword Str keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str Str Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str Str Num keyword ListLoad Call NameLoad keyword Str keyword Str keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str ListLoad Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str Str Str ListLoad Dict Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str Str ListLoad Dict Str Str keyword ListLoad Call NameLoad keyword Str keyword Str keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str Str Str ListLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str Str ListLoad Str keyword ListLoad Call NameLoad keyword Str keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str ListLoad Str Str Assign AttributeStore NameLoad attr Dict Str Dict Str Str Str ListLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str Str ListLoad Str keyword ListLoad Call NameLoad keyword Str keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Num Assign AttributeStore NameLoad attr Dict Str Dict Str Str Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str Str Num keyword ListLoad Call NameLoad keyword Str keyword Str keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Num Assign AttributeStore NameLoad attr Dict Str Dict Str Str Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Dict Str Str Str Num keyword ListLoad Call NameLoad keyword Str keyword Str keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Num Assign AttributeStore NameLoad attr Dict Str Str Dict Str NameLoad Dict Str ListLoad Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword Dict Str Str Dict Str NameLoad Dict Str ListLoad Str Str keyword ListLoad Call NameLoad keyword Str keyword Str Call NameLoad keyword Str keyword Str keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body With AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Dict Str Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Dict Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Dict Str Str Str Dict Str Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Dict Str Str Str Dict Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict Str Str decorator_list decorator_list
N/A __future__ absolute_import unicode_literals bson.objectid ObjectId mock patch mongorest.collection Collection mongorest.errors * mongorest.testcase TestCase mongorest.validator Validator N/A __all__ N/A TestValidator TestValidator N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self validator N/A Validator N/A test_validate_type_objectid_sets_error_if_not_objectid N/A N/A self N/A N/A N/A document N/A Collection N/A test 1 N/A N/A document schema N/A test N/A type objectid N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A N/A self validator errors N/A test must be of ObjectId type N/A test_validate_type_objectid_does_not_set_error_if_type_is_correct N/A N/A self N/A N/A N/A document N/A Collection N/A test N/A ObjectId N/A N/A document schema N/A test N/A type objectid N/A N/A N/A self assertTrue N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A N/A self validator errors N/A N/A test_validate_returns_true_if_no_errors_are_found N/A N/A self N/A N/A N/A document N/A Collection N/A N/A document schema N/A N/A N/A N/A self assertTrue N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A N/A self validator errors N/A N/A test_validate_returns_false_if_errors_are_found N/A N/A self N/A N/A N/A document N/A Collection N/A test test N/A N/A document schema N/A test N/A type objectid N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A N/A self validator errors N/A test must be of ObjectId type N/A test_validate_sets_correct_errors_on_document_if_unknown_field_error N/A N/A self N/A N/A N/A document N/A Collection N/A test 1 N/A N/A document schema N/A N/A N/A N/A self validator allow_unknown False N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A errors N/A N/A UnknownFieldError collection Collection field test N/A test_validate_sets_correct_errors_on_document_if_required_field_error N/A N/A self N/A N/A N/A document N/A Collection N/A N/A N/A document schema N/A test N/A required True N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A required True errors N/A N/A RequiredFieldError collection Collection field test N/A test_validate_sets_correct_errors_on_document_if_read_only_field_error N/A N/A self N/A N/A N/A document N/A Collection N/A test test N/A N/A document schema N/A test N/A readonly True N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A readonly True errors N/A N/A ReadOnlyFieldError collection Collection field test N/A test_validate_sets_correct_errors_on_document_if_field_type_error N/A N/A self N/A N/A N/A document N/A Collection N/A test test N/A N/A document schema N/A test N/A type integer N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type integer errors N/A N/A FieldTypeError collection Collection field test field_type integer N/A test_validate_sets_correct_errors_on_document_if_regex_match_error N/A N/A self N/A N/A N/A document N/A Collection N/A test 123456 N/A N/A document schema N/A test N/A type regex string [a-z]+ N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type regex string [a-z]+ errors N/A N/A RegexMatchError collection Collection field test regex [a-z]+ N/A test_validate_sets_correct_errors_on_document_if_min_length_error N/A N/A self N/A N/A N/A document N/A Collection N/A test 12 N/A N/A document schema N/A test N/A type minlength string 3 N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type minlength string 3 errors N/A N/A MinLengthError collection Collection field test min_length 3 N/A test_validate_sets_correct_errors_on_document_if_max_length_error N/A N/A self N/A N/A N/A document N/A Collection N/A test 1234 N/A N/A document schema N/A test N/A type maxlength string 3 N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type maxlength string 3 errors N/A N/A MaxLengthError collection Collection field test max_length 3 N/A test_validate_sets_correct_errors_on_document_if_length_error N/A N/A self N/A N/A N/A document N/A Collection N/A test N/A test test N/A N/A document schema N/A test N/A type items list N/A N/A type string N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type items list N/A N/A type string errors N/A N/A LengthError collection Collection field test length 1 N/A test_validate_sets_correct_errors_on_document_if_value_not_allowed_error N/A N/A self N/A N/A N/A document N/A Collection N/A test not_test N/A N/A document schema N/A test N/A type allowed string N/A test N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type allowed string N/A test errors N/A N/A ValueNotAllowedError collection Collection field test value not_test N/A test_validate_sets_correct_errors_on_document_if_values_not_allowed_error N/A N/A self N/A N/A N/A document N/A Collection N/A test N/A not_test test N/A N/A document schema N/A test N/A type allowed list N/A test N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type allowed list N/A test errors N/A N/A ValuesNotAllowedError collection Collection field test values ['not_test'] N/A test_validate_sets_correct_errors_on_document_if_min_value_error N/A N/A self N/A N/A N/A document N/A Collection N/A test 0 N/A N/A document schema N/A test N/A type min integer 10 N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type min integer 10 errors N/A N/A MinValueError collection Collection field test min_value 10 N/A test_validate_sets_correct_errors_on_document_if_max_value_error N/A N/A self N/A N/A N/A document N/A Collection N/A test 11 N/A N/A document schema N/A test N/A type max integer 10 N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test N/A type max integer 10 errors N/A N/A MaxValueError collection Collection field test max_value 10 N/A test_validate_sets_correct_errors_on_document_if_more_than_one_error N/A N/A self N/A N/A N/A document N/A Collection N/A test2 1 N/A N/A document schema N/A test1 test2 N/A required True N/A type N/A list string N/A N/A N/A self assertFalse N/A N/A N/A self validator validate_document document N/A N/A N/A self assertEqual N/A document errors N/A DocumentValidationError collection Collection document N/A document document schema N/A test1 test2 N/A required True N/A type N/A list string errors N/A N/A RequiredFieldError collection Collection field test1 N/A FieldTypeError collection Collection field test2 field_type list or string N/A test_flattened_errors_returns_flaten_call N/A N/A self flatten N/A N/A N/A N/A N/A self validator flattened_errors N/A N/A N/A N/A flatten assert_called_once_with N/A . N/A N/A patch mongorest.validator.Validator.flatten test_flatten_returns_flattened_dict N/A N/A self N/A N/A N/A flattened N/A N/A N/A self validator flatten N/A outter1 outter2 N/A inner test test N/A N/A N/A self assertEqual flattened N/A outter1.inner outter2 test test N/A test_get_field_schema_returns_schema_of_outer_field N/A N/A self N/A N/A N/A N/A N/A self validator schema N/A test N/A required True N/A N/A N/A self assertEqual N/A N/A N/A self validator get_field_schema test N/A required True N/A test_get_field_schema_returns_schema_of_inner_field N/A N/A self N/A N/A N/A N/A N/A self validator schema N/A test N/A type schema dict N/A test N/A required True N/A N/A N/A self assertEqual N/A N/A N/A self validator get_field_schema test.test N/A required True N/A test_get_field_schema_returns_inner_schema_of_field N/A N/A self N/A N/A N/A N/A N/A self validator schema N/A test N/A type schema list N/A type integer N/A N/A N/A self assertEqual N/A N/A N/A self validator get_field_schema test.1 N/A type integer N/A N/A