Skip to content

Commit

Permalink
fix: parent group update fixed; logger messages updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nenenko committed Jul 16, 2024
1 parent e1f503f commit cd5481d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions tests/test_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import os
import tempfile
import json
from pathlib import Path
from unittest import mock

Expand Down Expand Up @@ -408,20 +409,30 @@ def test_load_user_data_filters():
user_data_filters_expected = {
"userDataFilters": [
{
"id": "datafilter4",
"id": "datafilter2",
"maql": '{label/campaign_channels.category} = "1"',
"title": "Status filter",
"user": {"id": "5c867a8a-12af-45bf-8d85-c7d16bedebd1", "type": "user"},
},
{
"id": "datafilter2",
"id": "datafilter4",
"maql": '{label/campaign_channels.category} = "1"',
"title": "Status filter",
"user": {"id": "5c867a8a-12af-45bf-8d85-c7d16bedebd1", "type": "user"},
},
]
}
assert user_data_filters == user_data_filters_expected

# Convert both the expected and actual filter lists to sorted lists of their JSON string representations
sorted_user_data_filters = sorted(
json.dumps(d, sort_keys=True) for d in user_data_filters["userDataFilters"]
)
sorted_user_data_filters_expected = sorted(
json.dumps(d, sort_keys=True)
for d in user_data_filters_expected["userDataFilters"]
)

assert sorted_user_data_filters == sorted_user_data_filters_expected


@mock.patch("scripts.restore.create_client")
Expand Down

0 comments on commit cd5481d

Please sign in to comment.