Skip to content

Commit

Permalink
Fix reading from recording-attachments response (#87)
Browse files Browse the repository at this point in the history
* Fix use of api response

* Lint

* Fix tests

* Update tests

* Lint
  • Loading branch information
jordanbangia authored Aug 31, 2023
1 parent 71397ce commit 4e31bc3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion foxglove_data_platform/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ def get_attachments(
{
"id": i["id"],
"recording_id": i["recordingId"],
"device": i["device"],
"site_id": i["siteId"],
"name": i["name"],
"media_type": i["mediaType"],
Expand Down
9 changes: 1 addition & 8 deletions tests/test_attachments.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

@responses.activate
def test_get_attachments():
device_id = fake.uuid4()
device_name = fake.name()
attachment_id = fake.uuid4()
recording_id = fake.uuid4()
path = fake.file_name(extension="txt")
Expand All @@ -25,12 +23,11 @@ def test_get_attachments():

responses.add(
responses.GET,
api_url(f"/v1/recording-attachments"),
api_url("/v1/recording-attachments"),
json=[
{
"id": attachment_id,
"recordingId": recording_id,
"device": {"id": device_id, "name": device_name},
"siteId": site_id,
"name": path,
"mediaType": media_type,
Expand All @@ -53,10 +50,6 @@ def test_get_attachments():
"recording_id": recording_id,
"site_id": site_id,
"name": path,
"device": {
"id": device_id,
"name": device_name,
},
"media_type": media_type,
"size": size,
"crc": crc,
Expand Down

0 comments on commit 4e31bc3

Please sign in to comment.