UPD: Improved Tests

This commit is contained in:
2019-11-17 11:51:48 +01:00
parent c1637510f3
commit cbfdb188b1
2 changed files with 13 additions and 1 deletions

View File

@@ -143,6 +143,7 @@ class DjangoProjectTestCase(DjangoDeployTestCase):
'django_deploy.tests.fake_app2',
]
self.assert_installed_apps(project_dir, installed_apps)
self.assert_urlpatterns(project_dir, [])
def test_install_nonexisting_app(self):
project_dir = self._tmp_dir
@@ -190,6 +191,11 @@ class DjangoProjectTestCase(DjangoDeployTestCase):
('URLResolver', '^app2/', 'django_deploy.tests.fake_app2.urls'),
]
self.assert_urlpatterns(project_dir, expected_urlpatterns)
installed_apps = [
'django_deploy.tests.fake_app1',
'django_deploy.tests.fake_app2',
]
self.assert_installed_apps(project_dir, installed_apps)
def test_mount_unmountable_app(self):
project_dir = self._tmp_dir

View File

@@ -82,8 +82,8 @@ class ProgramTestCase(DjangoDeployTestCase):
'django_deploy.tests.fake_app1',
'django_deploy.tests.fake_app2',
]
self.assert_installed_apps(project_dir, installed_apps)
self.assert_urlpatterns(project_dir, [])
def test_install_apps_with_error(self):
project_dir = self._tmp_dir
@@ -122,6 +122,12 @@ class ProgramTestCase(DjangoDeployTestCase):
]
self.assert_urlpatterns(project_dir, urlpatterns)
installed_apps = [
'django_deploy.tests.fake_app1',
'django_deploy.tests.fake_app2',
]
self.assert_installed_apps(project_dir, installed_apps)
def test_mount_apps_with_errors(self):
project_dir = self._tmp_dir
self._program(argv=['-c', project_dir])