Skip to content

Commit

Permalink
updated to work with Apprise v1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Jul 26, 2024
1 parent 4fbbd8b commit e50b2db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions apprise_api/api/tests/test_stateful_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_stateful_configuration_io(self, mock_post):
"""

# our key to use
key = 'test_stateful'
key = 'test_stateful_01'

request = Mock()
request.content = b'ok'
Expand All @@ -77,13 +77,11 @@ def test_stateful_configuration_io(self, mock_post):

# Preare our list of URLs we want to save
urls = [
'devops=slack://TokenA/TokenB/TokenC',
'pushbullet=pbul://tokendetails',
'general,json=json://hostname',
]

# Monkey Patch
N_MGR['slack'].enabled = True
N_MGR['pbul'].enabled = True
N_MGR['json'].enabled = True

Expand All @@ -105,7 +103,7 @@ def test_stateful_configuration_io(self, mock_post):
assert response.status_code == 200

entries = re.split(r'[\r*\n]+', response.content.decode('utf-8'))
assert len(entries) == 3
assert len(entries) == 2

form_data = {
'body': '## test notification',
Expand Down Expand Up @@ -195,6 +193,7 @@ def test_stateful_configuration_io(self, mock_post):

# Now we do a similar approach as the above except we remove the
# configuration from under the application
key = 'test_stateful_02'
for _ in range(10):
# No content saved to the location yet
response = self.client.post('/get/{}'.format(key))
Expand All @@ -211,7 +210,7 @@ def test_stateful_configuration_io(self, mock_post):
assert response.status_code == 200

entries = re.split(r'[\r*\n]+', response.content.decode('utf-8'))
assert len(entries) == 3
assert len(entries) == 2

form_data = {
'body': '## test notification',
Expand Down Expand Up @@ -306,7 +305,7 @@ def test_stateful_configuration_io(self, mock_post):
'body': '## test notification',
'format': apprise.NotifyFormat.MARKDOWN,
# Comma (OR)
'tag': 'general, devops',
'tag': 'pushbullet, json',
}

form = NotifyForm(data=form_data)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# apprise @ git+https://github.com/caronc/apprise@custom-tag-or-version

## 3. The below grabs our stable version (generally the best choice):
apprise == 1.8.0
apprise == 1.8.1

## Apprise API Minimum Requirements
django
Expand Down

0 comments on commit e50b2db

Please sign in to comment.