Skip to content

Commit

Permalink
Test about window
Browse files Browse the repository at this point in the history
Mocks view and thus does not require a GUI framework for tests.

Related pwr-Solaar#2395
  • Loading branch information
MattHag committed Apr 6, 2024
1 parent 3779c2c commit 2d7f0c1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/solaar/ui/test_about_window.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from unittest import mock

from solaar.ui.about.model import AboutModel
from solaar.ui.about.presenter import Presenter


def test_about_dialog():
model = AboutModel()
view = mock.Mock()
presenter = Presenter(model, view)

presenter.run()

assert view.init_ui.called_once
assert view.update_comments.called_once
assert view.update_authors.called_once
assert view.update_translator_credits.called_once
assert view.update_website.called_once
assert view.mainloop.called_once

0 comments on commit 2d7f0c1

Please sign in to comment.