Skip to content

Commit

Permalink
Source Facebook Marketing #5190 - fixing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliizazmic committed Nov 1, 2021
1 parent 6a66d7b commit 49df07c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ class ListWithHashMixin(HashMixin, list):

def make_hashable(obj, exclude_fields: List[str] = None) -> str:
"""
Simplify comparison of nested dicts/lists
:param obj value for comparison
:param exclude_fields if value is Mapping, some fields can be excluded
"""
Simplify comparison of nested dicts/lists
:param obj value for comparison
:param exclude_fields if value is Mapping, some fields can be excluded
"""
if isinstance(obj, Mapping):
# If value is Mapping, some fields can be excluded
exclude_fields = exclude_fields or []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ def test_compare_two_records_nested_with_different_orders(obj1, obj2, is_same):

def test_exclude_fields():
"""Test that check ignoring fields"""
data = [sorted_data(), ]
data = [
sorted_data(),
]
ignored_fields = [
"organization_id",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
"destination_sync_mode": "append"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"credentials_json": "{\n \"type\": \"service_account\"}\n",
"email": "test_email",
"lookback": 0
"credentials_json": "{\n \"type\": \"service_account\"}\n",
"email": "test_email",
"lookback": 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@
"type": "string"
}
},
"required": [
"time",
"uniqueQualifier",
"applicationName",
"customerId"
]
"required": ["time", "uniqueQualifier", "applicationName", "customerId"]
},
"etag": {
"type": "string"
Expand All @@ -41,9 +36,7 @@
"type": "string"
}
},
"required": [
"email"
]
"required": ["email"]
},
"ipAddress": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@
"type": "string"
}
},
"required": [
"time",
"uniqueQualifier",
"applicationName",
"customerId"
]
"required": ["time", "uniqueQualifier", "applicationName", "customerId"]
},
"etag": {
"type": "string"
Expand All @@ -44,11 +39,7 @@
"type": "string"
}
},
"required": [
"callerType",
"email",
"profileId"
]
"required": ["callerType", "email", "profileId"]
},
"events": {
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@
"type": "string"
}
},
"required": [
"time",
"uniqueQualifier",
"applicationName",
"customerId"
]
"required": ["time", "uniqueQualifier", "applicationName", "customerId"]
},
"etag": {
"type": "string"
Expand All @@ -41,10 +36,7 @@
"type": "string"
}
},
"required": [
"email",
"profileId"
]
"required": ["email", "profileId"]
},
"ipAddress": {
"type": "string"
Expand Down

0 comments on commit 49df07c

Please sign in to comment.