mirror of
https://github.com/caronc/apprise.git
synced 2025-08-18 12:30:13 +02:00
Refactor Test Code for Efficiency and Quality (#1100)
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from json import dumps
|
||||
from apprise import Apprise
|
||||
@@ -111,19 +112,11 @@ def test_plugin_twist_init():
|
||||
NotifyTwist() init()
|
||||
|
||||
"""
|
||||
try:
|
||||
with pytest.raises(TypeError):
|
||||
NotifyTwist(email='invalid', targets=None)
|
||||
assert False
|
||||
except TypeError:
|
||||
# Invalid email address
|
||||
assert True
|
||||
|
||||
try:
|
||||
with pytest.raises(TypeError):
|
||||
NotifyTwist(email='user@domain', targets=None)
|
||||
assert False
|
||||
except TypeError:
|
||||
# No password was specified
|
||||
assert True
|
||||
|
||||
# Simple object initialization
|
||||
result = NotifyTwist(
|
||||
|
Reference in New Issue
Block a user