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
dd0e40eb
Commit
dd0e40eb
authored
Feb 12, 2020
by
Jörg Stucke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests, added config files
parent
327d0a04
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
13 deletions
+19
-13
.isort.cfg
.isort.cfg
+6
-0
.pylintrc
.pylintrc
+0
-0
__init__.py
common_helper_mongo/__init__.py
+4
-3
pytest.ini
pytest.ini
+8
-3
test_aggregate.py
tests/test_aggregate.py
+1
-7
No files found.
.isort.cfg
0 → 100644
View file @
dd0e40eb
[settings]
line_length=120
default_section = THIRDPARTY
known_first_party=analysis,compare,helperFunctions,install,intercom,objects,plugins,
scheduler,statistic,storage,test,unpacker,version,web_interface
multi_line_output=6
.pylintrc
0 → 100644
View file @
dd0e40eb
This diff is collapsed.
Click to expand it.
common_helper_mongo/__init__.py
View file @
dd0e40eb
from
.aggregate
import
(
get_field_average
,
get_field_execute_operation
,
get_field_sum
,
get_list_of_all_values
,
get_objects_and_count_of_occurrence
)
from
.aggregate
import
(
get_field_average
,
get_field_execute_operation
,
get_field_sum
,
get_list_of_all_values
,
get_objects_and_count_of_occurrence
)
from
.gridfs
import
overwrite_file
__all__
=
[
...
...
pytest.ini
View file @
dd0e40eb
[pytest]
addopts
=
--pep8 -v
pep8ignore
=
*.py E501
addopts
=
--flake8 -v
flake8-ignore
=
*.py
E501
W503
install.py
E402
src/plugins/*
E402
*/bin/*
ALL
flake8-select
=
*.py
W504
tests/test_aggregate.py
View file @
dd0e40eb
from
common_helper_mongo.aggregate
import
(
get_all_value_combinations_of_fields
,
get_field_average
,
get_field_sum
,
get_list_of_all_values
,
get_
list_of_all_values_and_collect_information_of_additional_field
,
get_objects_and_count_of_occurrence
,
get_
objects_and_count_of_occurrence
)
from
tests.base_class_database_test
import
MongoDbTest
...
...
@@ -81,9 +81,3 @@ class TestAggregate(MongoDbTest):
def
test_get_field_execute_operation_empty
(
self
):
result
=
get_field_sum
(
self
.
test_collection
,
"$test_int"
)
self
.
assertEqual
(
result
,
0
)
def
test_get_list_of_all_values_and_collect_information_of_additional_field
(
self
):
self
.
add_list_test_data
()
with
self
.
assertLogs
()
as
logger
:
get_list_of_all_values_and_collect_information_of_additional_field
(
self
.
test_collection
,
"$test_list"
,
"$_id"
,
unwind
=
True
)
assert
'deprecation warning'
in
logger
.
output
.
pop
()
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