Module Import alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr NameStore Call NameLoad NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Dict Str Str Assign NameStore Call NameLoad keyword Num keyword NameLoad Assign NameStore Call NameLoad keyword Num keyword NameLoad Assign NameStore Call NameLoad keyword Num Assign NameStore Call NameLoad Assign NameStore Call NameLoad keyword NameLoad decorator_list ClassDef bases NameLoad body ClassDef bases body Assign NameStore Call AttributeLoad NameLoad attr keyword ListLoad Str Str keyword NameLoad decorator_list ClassDef bases body Assign NameStore NameLoad decorator_list decorator_list ClassDef bases NameLoad body ClassDef bases body Assign NameStore NameLoad Assign NameStore Str Assign NameStore Dict Str Str ListLoad Str NameLoad decorator_list decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore ListLoad Dict Str Str Str Str Str Str Str Num NameLoad Str Dict Str Str Str Str Str Str Str Num NameLoad Str Dict Str Str Str Str Str Str Str Num NameLoad Str Dict Str Str Str Str Str Str Str Num NameLoad Str Dict Str Str Str Str Str Str Num NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Str Num Dict Str Str Str Str Str Num AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Str Str Str Dict Str Str Str Str Dict Str Str Str Str AttributeLoad NameLoad attr keyword ListLoad Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Pass decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Pass decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A unittest flask_mongoengine MongoEngine mongoengine.fields IntField StringField BooleanField flask_potion.contrib.mongoengine MongoEngineManager flask_potion ModelResource fields Api tests BaseTestCase FilterTestCase N/A BaseTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super FilterTestCase self setUp N/A app N/A self app N/A N/A N/A app config N/A MONGODB_DB potion-test-db N/A N/A N/A app config N/A TESTING True N/A N/A self api N/A Api N/A self app default_manager MongoEngineManager N/A N/A self me me N/A MongoEngine app User N/A N/A me Document N/A N/A meta N/A collection user N/A first_name N/A StringField max_length 60 null False N/A last_name N/A StringField max_length 60 null False N/A gender N/A StringField max_length 1 N/A age N/A IntField N/A is_staff N/A BooleanField default None N/A UserResource N/A ModelResource N/A Schema N/A N/A N/A gender N/A N/A fields String enum N/A f m nullable True N/A Meta N/A N/A N/A model User N/A N/A AllowUserResource N/A ModelResource N/A Meta N/A N/A N/A model User N/A name allow-user N/A filters N/A first_name is_staff N/A eq True N/A N/A N/A N/A N/A N/A self api add_resource UserResource N/A N/A N/A N/A self api add_resource AllowUserResource N/A post_sample_set_a N/A N/A self N/A N/A N/A user N/A N/A first_name last_name age is_staff gender John Doe 32 True m N/A first_name last_name age is_staff gender Jonnie Doe 25 False m N/A first_name last_name age is_staff gender Jane Roe 18 False f N/A first_name last_name age is_staff gender Joe Bloggs 21 True m N/A first_name last_name age is_staff Sue Watts 25 True N/A N/A response N/A N/A N/A self client post /user data user N/A N/A N/A self assert200 response N/A test_equality N/A N/A self N/A N/A N/A N/A N/A self post_sample_set_a N/A response N/A N/A N/A self client get /user?where={"last_name": "Doe"} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name John Doe N/A first_name last_name Jonnie Doe N/A response json without N/A $uri $uri $id $type gender age is_staff N/A response N/A N/A N/A self client get /user?where={"age": 25} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name age Jonnie Doe 25 N/A first_name last_name age Sue Watts 25 N/A response json without N/A $uri $id $type gender is_staff N/A response N/A N/A N/A self client get /user?where={"last_name": "Doe", "age": 25} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name Jonnie Doe N/A response json without N/A $uri $id $type gender age is_staff N/A test_inequality N/A N/A self N/A N/A N/A N/A N/A self post_sample_set_a N/A response N/A N/A N/A self client get /user?where={"last_name": {"$ne": "Watts"}, "age": {"$ne": 32}} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name Jonnie Doe N/A first_name last_name Jane Roe N/A first_name last_name Joe Bloggs N/A response json without N/A $uri $id $type gender age is_staff N/A response N/A N/A N/A self client get /user?where={"age": {"$gt": 25}} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name John Doe N/A response json without N/A $uri $id $type gender age is_staff N/A response N/A N/A N/A self client get /user?where={"age": {"$gte": 25}} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name John Doe N/A first_name last_name Jonnie Doe N/A first_name last_name Sue Watts N/A response json without N/A $uri $id $type gender age is_staff N/A response N/A N/A N/A self client get /user?where={"age": {"$lte": 21}} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name Jane Roe N/A first_name last_name Joe Bloggs N/A response json without N/A $uri $id $type gender age is_staff N/A response N/A N/A N/A self client get /user?where={"age": {"$lt": 21.0}} N/A N/A N/A self assert400 response N/A response N/A N/A N/A self client get /user?where={"age": {"$lt": null}} N/A N/A N/A self assert400 response N/A response N/A N/A N/A self client get /user?where={"first_name": {"$gt": "Jo"}} N/A N/A N/A self assert400 response N/A test_in N/A N/A self N/A N/A N/A N/A N/A self post_sample_set_a N/A response N/A N/A N/A self client get /user?where={"last_name": {"$in": ["Bloggs", "Watts"]}} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name Joe Bloggs N/A first_name last_name Sue Watts N/A response json without N/A $uri $id $type gender age is_staff N/A response N/A N/A N/A self client get /user?where={"last_name": {"$in": []}} N/A N/A N/A self assertEqualWithout N/A N/A response json without N/A $uri $id $type gender age is_staff N/A test_startswith N/A N/A self N/A N/A N/A N/A N/A self post_sample_set_a N/A response N/A N/A N/A self client get /user?where={"first_name": {"$startswith": "Jo"}} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name John Doe N/A first_name last_name Jonnie Doe N/A first_name last_name Joe Bloggs N/A response json without N/A $uri $id $type gender age is_staff N/A response N/A N/A N/A self client get /user?where={"first_name": {"$startswith": "J%e"}} N/A N/A N/A self assertEqualWithout N/A N/A response json without N/A $uri $id $type gender age is_staff N/A test_text_search N/A N/A self N/A N/A N/A N/A N/A self post_sample_set_a N/A response N/A N/A N/A self client get /user?search=sbc+dedf&rank=1 N/A N/A unittest SkipTest test_sort N/A N/A self N/A N/A N/A N/A N/A self post_sample_set_a N/A response N/A N/A N/A self client get /user?sort={"last_name": true, "first_name": false} N/A N/A N/A self assert200 response N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name Sue Watts N/A first_name last_name Jane Roe N/A first_name last_name John Doe N/A first_name last_name Jonnie Doe N/A first_name last_name Joe Bloggs N/A response json without N/A $uri $id $type gender age is_staff N/A response N/A N/A N/A self client get /user?sort={"age": false, "first_name": false} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name Jane Roe N/A first_name last_name Joe Bloggs N/A first_name last_name Jonnie Doe N/A first_name last_name Sue Watts N/A first_name last_name John Doe N/A response json without N/A $uri $id $type gender age is_staff N/A test_sort_and_where N/A N/A self N/A N/A N/A N/A N/A self post_sample_set_a N/A response N/A N/A N/A self client get /user?where={"first_name": {"$startswith": "Jo"}}&sort={"first_name": false} N/A N/A N/A self assertEqualWithout N/A N/A first_name last_name Joe Bloggs N/A first_name last_name John Doe N/A first_name last_name Jonnie Doe N/A response json without N/A $uri $id $type gender age is_staff N/A test_sort_pages N/A N/A self N/A N/A N/A N/A N/A unittest SkipTest test_disallowed_where_filters N/A N/A self N/A N/A N/A N/A N/A unittest SkipTest test_schema N/A N/A self N/A N/A N/A N/A N/A unittest SkipTest tearDown N/A N/A self N/A N/A N/A N/A N/A N/A N/A self me connection drop_database potion-test-db N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main