Skip to content

Commit

Permalink
production test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TexasCoding committed Jun 25, 2024
1 parent 16819e1 commit 0ab9c45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
SLACK_ACCESS_TOKEN: ${{ secrets.SLACK_ACCESS_TOKEN }}
SLACK_USERNAME: ${{ secrets.SLACK_USERNAME }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PRODUCTION: ${{ secrets.PRODUCTION }}

jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_global_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def test_send_position_messages_sell(capsys):
]
pos_type = "sell"
result = send_position_messages(positions, pos_type)
printed_message = capsys.readouterr().out
if not production:
printed_message = capsys.readouterr().out
assert (
printed_message
== """Message: Successfully sold the following positions:
Expand All @@ -32,8 +32,8 @@ def test_send_position_messages_buy(capsys):
]
pos_type = "buy"
result = send_position_messages(positions, pos_type)
printed_message = capsys.readouterr().out
if not production:
printed_message = capsys.readouterr().out
assert (
printed_message
== """Message: Successfully bought the following positions:
Expand All @@ -50,8 +50,8 @@ def test_send_position_messages_liquidate(capsys):
]
pos_type = "liquidate"
result = send_position_messages(positions, pos_type)
printed_message = capsys.readouterr().out
if not production:
printed_message = capsys.readouterr().out
assert (
printed_message
== """Message: Successfully liquidated the following positions:
Expand Down

0 comments on commit 0ab9c45

Please sign in to comment.