-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from cyber-francis/initial_commit
fix: updated pytest
- Loading branch information
Showing
5 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,18 +29,16 @@ jobs: | |
- name: Publish | ||
uses: pypa/[email protected] | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
# repository-url: https://test.pypi.org/legacy/ | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
- name: Test Install | ||
run: | | ||
python3 -m pip install --no-cache-dir -i https://test.pypi.org/simple/ slack-notification | ||
python3 -m pip install --no-cache-dir slack-notification | ||
- name: Test Usage | ||
run: | | ||
python3 - <<EOF | ||
from slack_notification.slack_notification import SlackNotification | ||
APP_NAME = "APP_X" | ||
APP_VERSION = "v0.0.1" | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from src.slack_notification.slack_notification import SlackNotification | ||
|
||
|
||
def test_format_str(): | ||
slack = SlackNotification("FAKE_CHANNEL") | ||
formated_message = slack.format("TEST_MESSAGE") | ||
assert formated_message == {"text": "TEST_MESSAGE"} | ||
|
||
|
||
def test_format_dict(): | ||
slack = SlackNotification("FAKE_CHANNEL") | ||
formated_message = slack.format({"KEY": "VALUE"}) | ||
assert formated_message == {"text": "{'KEY': 'VALUE'}"} | ||
formated_message = slack.format |
This file was deleted.
Oops, something went wrong.