Skip to content

Commit 5d67ca9

Browse files
committed
added a test for the show_all command
1 parent 5d26c61 commit 5d67ca9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from unittest import TestCase
2+
from unittest.mock import call, patch
3+
4+
from piccolo.apps.app.commands.show_all import show_all
5+
6+
7+
class TestShowAll(TestCase):
8+
@patch("piccolo.apps.app.commands.show_all.print")
9+
def test_show_all(self, mocked_print):
10+
show_all()
11+
12+
self.assertEqual(
13+
mocked_print.mock_calls,
14+
[call("Registered apps:"), call("tests.example_app.piccolo_app")],
15+
)

0 commit comments

Comments
 (0)