Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
stacimc committed Nov 15, 2023
1 parent 7b7dbe6 commit e9ebb4d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions catalog/tests/dags/database/test_delete_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from database.delete_records.delete_records import (
create_deleted_records,
delete_records_from_media_table,
notify_slack,
)


Expand Down Expand Up @@ -246,3 +247,11 @@ def test_delete_no_records_from_media_table(

# All three records are left in the image table
assert len(actual_rows) == 3


def test_notify_slack():
message = notify_slack.function(123456789, "audio", "WHERE provider='foo';")
assert message == (
"Deleted 123,456,789 records from the audio table matching query: "
"`WHERE provider='foo';`"
)

0 comments on commit e9ebb4d

Please sign in to comment.