Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocks require cleanup #32

Open
github-actions bot opened this issue Sep 25, 2021 · 0 comments
Open

Mocks require cleanup #32

github-actions bot opened this issue Sep 25, 2021 · 0 comments

Comments

@github-actions
Copy link

Mocks require cleanup

clean up mocks, maybe find a better way to create mocks?

# TODO Mocks require cleanup

from src.tests.future_creator import future_creator
from src.utils.status import MESSAGE_STATUS as STATUS

# TODO Mocks require cleanup
# labels: tests
# clean up mocks, maybe find a better way to create mocks?

bot_mock = Mock()
message_mock = Mock()
state_mock = Mock()
channel_mock = Mock()
logger_mock = Mock()
ocr = Mock()

logger_mock.message_to_channel.return_value = future_creator(None)
state_mock.valid_tournament_player.return_value = True
bot_mock.user = 'bot'
bot_mock.process_commands.return_value = future_creator(None)
message_mock.author = 'TestUser#1'

coordinator = MessageCoordinator(bot_mock, state_mock, logger_mock, ocr)

@pytest.fixture(autouse=True)
def pytest_reset_mocks():

b6b3850170f0575445ec960fd086a40bdf68e665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants