Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common_helper_mongo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
common_helper_mongo
Commits
b48e773b
Commit
b48e773b
authored
Dec 13, 2016
by
Peter Weidenbach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
match test added
parent
d0a92797
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
test_aggregate.py
tests/test_aggregate.py
+7
-0
No files found.
tests/test_aggregate.py
View file @
b48e773b
...
@@ -19,6 +19,13 @@ class TestAggregate(MongoDbTest):
...
@@ -19,6 +19,13 @@ class TestAggregate(MongoDbTest):
self
.
assertEqual
(
result
[
0
][
'_id'
],
"c"
,
"should be the first element because it has two ocurrences"
)
self
.
assertEqual
(
result
[
0
][
'_id'
],
"c"
,
"should be the first element because it has two ocurrences"
)
self
.
assertEqual
(
result
[
0
][
'count'
],
2
)
self
.
assertEqual
(
result
[
0
][
'count'
],
2
)
def
test_get_objects_and_count_match
(
self
):
self
.
add_simple_test_data
()
result
=
get_objects_and_count_of_occurrence
(
self
.
test_collection
,
"$test_txt"
,
unwind
=
"False"
,
match
=
{
"test_int"
:
0
})
self
.
assertEqual
(
len
(
result
),
1
,
"number of results not correct"
)
self
.
assertEqual
(
result
[
0
][
'_id'
],
"item 0"
)
print
(
result
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
unittest
.
main
()
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment