Skip to content

Commit 49b91f3

Browse files
committed
added a simple test for sql_shell
1 parent ad4b90d commit 49b91f3

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

tests/apps/sql_shell/__init__.py

Whitespace-only changes.

tests/apps/sql_shell/commands/__init__.py

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from unittest import TestCase
2+
from unittest.mock import patch, MagicMock
3+
4+
from piccolo.apps.sql_shell.commands.run import run
5+
6+
7+
class TestRun(TestCase):
8+
@patch("piccolo.apps.sql_shell.commands.run.subprocess")
9+
def test_run(self, subprocess: MagicMock):
10+
"""
11+
A simple test to make sure it executes without raising any exceptions.
12+
"""
13+
run()
14+
self.assertTrue(subprocess.run.called)

0 commit comments

Comments
 (0)