Skip to content

Commit

Permalink
squashme [Skip CI]
Browse files Browse the repository at this point in the history
  • Loading branch information
half-duplex committed Jan 18, 2020
1 parent 017645a commit 1b79aa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def url_handler(*args, **kwargs):
assert list(sopel.search_url_callbacks('https://www.example.com'))

# unregister this pattern
sopel.unregister_url_callback(test_pattern)
sopel.unregister_url_callback(test_pattern, url_handler)

# now it is not possible to find a callback for this pattern
results = list(sopel.search_url_callbacks('https://www.example.com'))
Expand All @@ -370,7 +370,7 @@ def url_handler(*args, **kwargs):
sopel.memory["url_callbacks"] = SopelMemory()
sopel.memory["url_callbacks"][re.compile(test_pattern)] = url_handler
results = list(sopel.search_url_callbacks("https://www.example.com"))
assert results[0][0] == url_handler, "Callback must be absent"
assert results[0][0] == url_handler, "Callback must be present"

# unregister it
sopel.unregister_url_callback(test_pattern, url_handler)
Expand Down

0 comments on commit 1b79aa9

Please sign in to comment.