Skip to content

Commit

Permalink
reformat files
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa committed Dec 14, 2023
1 parent 6f4871a commit a12ffa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/segments/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def _update_or_create_segment_rules(
)

def _update_or_create_metadata(self, metadata_data, segment=None):

for metadata_item in metadata_data:
metadata_id = metadata_item.pop("id", None)
if metadata_item.get("delete"):
Expand All @@ -142,6 +141,7 @@ def _update_or_create_metadata(self, metadata_data, segment=None):
"object_id": segment.id,
},
)

@staticmethod
def _update_or_create_segment_rule(
rule_data: dict, segment: Segment = None, rule: SegmentRule = None
Expand Down
7 changes: 2 additions & 5 deletions api/tests/unit/segments/test_unit_segments_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,7 @@ def test_update_segment_delete_existing_rule(project, client, segment, segment_r

@pytest.mark.parametrize(
"client",
[
lazy_fixture("admin_master_api_key_client"),
lazy_fixture("admin_client")
],
[lazy_fixture("admin_master_api_key_client"), lazy_fixture("admin_client")],
)
def test_create_segment_with_required_metadata_returns_201(
project,
Expand All @@ -607,7 +604,7 @@ def test_create_segment_with_required_metadata_returns_201(

# When
response = client.post(url, data=json.dumps(data), content_type="application/json")
print('DEBUG: response.json():', response.json())
print("DEBUG: response.json():", response.json())

# Then
assert response.status_code == status.HTTP_201_CREATED
Expand Down

0 comments on commit a12ffa3

Please sign in to comment.