diff --git a/stonkmaster/commands/ChartCommand.py b/stonkmaster/commands/ChartCommand.py index c2500ba..9f75403 100644 --- a/stonkmaster/commands/ChartCommand.py +++ b/stonkmaster/commands/ChartCommand.py @@ -27,8 +27,8 @@ async def run(self, ctx, arg): candlestick.update_layout(xaxis_rangeslider_visible=False, title=chart_title) candlestick.update_yaxes(tickprefix='$') - candlestick.write_image(f"/tmp/the-stonk-master/{info['symbol']}.png") - with open(f"/tmp/the-stonk-master/{info['symbol']}.png", 'rb') as f: + candlestick.write_image(f"/tmp/{info['symbol']}.png") + with open(f"/tmp/{info['symbol']}.png", 'rb') as f: picture = discord.File(f) await ctx.send(file=picture) diff --git a/tests/commands/test_price_command.py b/tests/commands/test_price_command.py index 721422c..8dc8916 100644 --- a/tests/commands/test_price_command.py +++ b/tests/commands/test_price_command.py @@ -16,11 +16,11 @@ async def test_price_gme(): ) if is_market_closed(): assert discord_ctx.messages.pop() == "Market is currently **closed**" + else: + gme_special_msg = "Wennst ned woasd, wannst GME vakaffa wuisd, kosd de do orientiern: " + assert gme_special_msg == discord_ctx.messages.pop() - assert re.match(matching_regex, discord_ctx.messages.pop(0)) - - matching_regex = "Wennst ned woasd, wannst GME vakaffa wuisd, kosd de do orientiern: " - assert re.match(matching_regex, discord_ctx.messages.pop(0)) + assert re.match(matching_regex, discord_ctx.messages.pop()) @pytest.mark.asyncio