Skip to content

Commit

Permalink
Updated tests for discord bot event!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Jun 14, 2023
1 parent 1711997 commit cb037b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="tc-messageBroker",
version="1.2.1",
version="1.3.0",
author="Mohammad Amin Dadgar, RnDAO",
maintainer="Mohammad Amin Dadgar",
maintainer_email="[email protected]",
Expand Down
7 changes: 6 additions & 1 deletion tests/unit/test_predefined_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
def test_discord_update_channels_tx():
tx = DISCORD_UPDATE_CHANNELS_TRANSACTIONS

assert len(tx) == 2
assert len(tx) == 3
assert tx[0].order == 1
assert tx[0].queue == Queue.DISCORD_BOT
assert tx[0].event == Event.DISCORD_BOT.FETCH
Expand All @@ -21,6 +21,11 @@ def test_discord_update_channels_tx():
assert tx[1].event == Event.DISCORD_ANALYZER.RUN
assert tx[1].status == Status.NOT_STARTED

assert tx[2].order == 3
assert tx[2].queue == Queue.DISCORD_BOT
assert tx[2].event == Event.DISCORD_BOT.SEND_MESSAGE
assert tx[2].status == Status.NOT_STARTED


def test_discord_scheduled_job_tx():
tx = DISCORD_SCHEDULED_JOB_TRANSACTIONS
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_saga_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_choreagraphy_sorting_orders_predefined_choreogprahy():
saga.choreography.transactions
)

assert not_started_count == 2
assert not_started_count == 3
order_val = 0
for tx in tx_sorted:
if tx.status == Status.NOT_STARTED:
Expand All @@ -45,7 +45,7 @@ def test_assert_sorting_status_predefined_choreagprahy():
saga.choreography.transactions
)

assert not_started_count == 2
assert not_started_count == 3

condition = False
for tx in tx_sorted:
Expand Down

0 comments on commit cb037b3

Please sign in to comment.