Skip to content

Commit

Permalink
More formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisKrone committed Feb 5, 2024
1 parent cda14a0 commit 556697f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions locust_plugins/mongoreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def __init__(
self.timestamp_field = timestamp_field
if not coll:
self.coll: Collection = MongoClient(env["LOCUST_MONGO"])[env["LOCUST_MONGO_DATABASE"]][
env["LOCUST_MONGO_COLLECTION"]
]
env["LOCUST_MONGO_COLLECTION"]
]
else:
self.coll = coll
self.cursor: Cursor = self.coll.find(filter, sort=[(self.timestamp_field, 1)])
Expand Down
3 changes: 2 additions & 1 deletion test/test_cloudwatch_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@

setup_logging("INFO", None)


class CloudwatchMock:
def __init__(self):
self.call_count = 0
self.metrics_dict = {}


def put_metric_data(self, Namespace, MetricData):
self.call_count += 1
self.metrics_dict[Namespace] = MetricData


cw = CloudwatchMock()


def on_locust_init(environment, **_kwargs):
CloudwatchAdapter(environment, "MyExampleService", "perf", cw)

Expand Down

0 comments on commit 556697f

Please sign in to comment.