Commit dd0e40eb by Jörg Stucke

fixed tests, added config files

parent 327d0a04
[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
This diff is collapsed. Click to expand it.
from .aggregate import (get_field_average, get_field_execute_operation, from .aggregate import (
get_field_sum, get_list_of_all_values, get_field_average, get_field_execute_operation, get_field_sum, get_list_of_all_values,
get_objects_and_count_of_occurrence) get_objects_and_count_of_occurrence
)
from .gridfs import overwrite_file from .gridfs import overwrite_file
__all__ = [ __all__ = [
......
[pytest] [pytest]
addopts = --pep8 -v addopts = --flake8 -v
pep8ignore = flake8-ignore =
*.py E501 *.py E501 W503
install.py E402
src/plugins/* E402
*/bin/* ALL
flake8-select =
*.py W504
from common_helper_mongo.aggregate import ( from common_helper_mongo.aggregate import (
get_all_value_combinations_of_fields, get_field_average, get_field_sum, get_list_of_all_values, 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 from tests.base_class_database_test import MongoDbTest
...@@ -81,9 +81,3 @@ class TestAggregate(MongoDbTest): ...@@ -81,9 +81,3 @@ class TestAggregate(MongoDbTest):
def test_get_field_execute_operation_empty(self): def test_get_field_execute_operation_empty(self):
result = get_field_sum(self.test_collection, "$test_int") result = get_field_sum(self.test_collection, "$test_int")
self.assertEqual(result, 0) 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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment