mirror of
https://github.com/YunoHost-Apps/django-for-runners_ynh.git
synced 2024-09-03 18:26:16 +02:00
Add a "manage_local_test.py" and tests
This commit is contained in:
parent
3690d358ae
commit
6d0f07ec6e
2 changed files with 28 additions and 0 deletions
11
manage_local_test.py
Executable file
11
manage_local_test.py
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!.venv/bin/python3
|
||||
|
||||
"""
|
||||
Call the "manage.py" from the local test environment.
|
||||
"""
|
||||
|
||||
from django_yunohost_integration.local_test import run_local_test_manage
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run_local_test_manage()
|
17
tests/test_manage_local_test.py
Normal file
17
tests/test_manage_local_test.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import subprocess
|
||||
from unittest import TestCase
|
||||
|
||||
from bx_py_utils.path import assert_is_file
|
||||
|
||||
from django_yunohost_integration.path_utils import get_project_root
|
||||
|
||||
|
||||
class ManageLocalTestTestCase(TestCase):
|
||||
def test_manage_local_test_check(self):
|
||||
|
||||
manage_local_test_bin = get_project_root() / 'manage_local_test.py'
|
||||
assert_is_file(manage_local_test_bin)
|
||||
|
||||
output = subprocess.check_output([manage_local_test_bin, 'check'], text=True)
|
||||
self.assertIn('Setup local YunoHost package', output)
|
||||
self.assertIn('django-for-runners_ynh/local_test/', output)
|
Loading…
Reference in a new issue