MCPcopy Create free account
hub / github.com/StackStorm/st2 / FakeModelDB

Class FakeModelDB

st2common/tests/unit/base.py:81–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79
80
81class FakeModelDB(stormbase.StormBaseDB):
82 context = stormbase.EscapedDictField()
83 index = mongoengine.IntField(min_value=0)
84 category = mongoengine.StringField()
85 timestamp = mongoengine.DateTimeField()
86
87 meta = {
88 "indexes": [
89 {"fields": ["index"]},
90 {"fields": ["category"]},
91 {"fields": ["timestamp"]},
92 {"fields": ["context.user"]},
93 ]
94 }
95
96
97class FakeModel(Access):

Callers 15

test_crudMethod · 0.90
test_countMethod · 0.90
test_get_allMethod · 0.90
test_query_by_idMethod · 0.90
test_query_by_nameMethod · 0.90
test_query_filterMethod · 0.90
test_null_filterMethod · 0.90
test_datetime_rangeMethod · 0.90
test_paginationMethod · 0.90
test_sort_multipleMethod · 0.90
test_escaped_fieldMethod · 0.90

Calls

no outgoing calls

Tested by 15

test_crudMethod · 0.72
test_countMethod · 0.72
test_get_allMethod · 0.72
test_query_by_idMethod · 0.72
test_query_by_nameMethod · 0.72
test_query_filterMethod · 0.72
test_null_filterMethod · 0.72
test_datetime_rangeMethod · 0.72
test_paginationMethod · 0.72
test_sort_multipleMethod · 0.72
test_escaped_fieldMethod · 0.72