Skip to content

Commit

Permalink
Fix test_compute
Browse files Browse the repository at this point in the history
  • Loading branch information
afausti committed Oct 3, 2021
1 parent 3a2f274 commit d866934
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tests/kafkaaggregator/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pytest

from kafkaaggregator.aggregator import Aggregator
from kafkaaggregator.aggregator_config import AggregatorConfig
from kafkaaggregator.fields import Field
from kafkaaggregator.models import create_record

Expand Down Expand Up @@ -90,10 +91,11 @@ def test_compute(
expected_result: `dict`
Dictionary with the expected result for the aggregated_message
"""
Agg = Aggregator(
config_file=config_dir.joinpath("aggregator_config.yaml"),
aggregated_topic="aggregated_example0",
)
config_file = config_dir.joinpath("aggregator_config.yaml")

aggregated_topic = AggregatorConfig(config_file).get("aggregated_example0")

Agg = Aggregator(aggregated_topic)

# Mock the creation of the aggregated fields
Agg._aggregated_fields = aggregated_fields
Expand Down Expand Up @@ -132,12 +134,11 @@ def test_compute_min_sample_size(
expected_result: `dict`
Dictionary with the expected result for the aggregated_message
"""
Agg = Aggregator(
config_file=config_dir.joinpath(
"aggregator_config_min_sample_size.yaml"
),
aggregated_topic="aggregated_example0",
)
config_file = config_dir.joinpath("aggregator_config_min_sample_size.yaml")

aggregated_topic = AggregatorConfig(config_file).get("aggregated_example0")

Agg = Aggregator(aggregated_topic)

# Mock the creation of the aggregated fields
Agg._aggregated_fields = aggregated_fields
Expand Down

0 comments on commit d866934

Please sign in to comment.