UPD: Improved Tests
This commit is contained in:
@@ -143,6 +143,7 @@ class DjangoProjectTestCase(DjangoDeployTestCase):
|
|||||||
'django_deploy.tests.fake_app2',
|
'django_deploy.tests.fake_app2',
|
||||||
]
|
]
|
||||||
self.assert_installed_apps(project_dir, installed_apps)
|
self.assert_installed_apps(project_dir, installed_apps)
|
||||||
|
self.assert_urlpatterns(project_dir, [])
|
||||||
|
|
||||||
def test_install_nonexisting_app(self):
|
def test_install_nonexisting_app(self):
|
||||||
project_dir = self._tmp_dir
|
project_dir = self._tmp_dir
|
||||||
@@ -190,6 +191,11 @@ class DjangoProjectTestCase(DjangoDeployTestCase):
|
|||||||
('URLResolver', '^app2/', 'django_deploy.tests.fake_app2.urls'),
|
('URLResolver', '^app2/', 'django_deploy.tests.fake_app2.urls'),
|
||||||
]
|
]
|
||||||
self.assert_urlpatterns(project_dir, expected_urlpatterns)
|
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):
|
def test_mount_unmountable_app(self):
|
||||||
project_dir = self._tmp_dir
|
project_dir = self._tmp_dir
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ class ProgramTestCase(DjangoDeployTestCase):
|
|||||||
'django_deploy.tests.fake_app1',
|
'django_deploy.tests.fake_app1',
|
||||||
'django_deploy.tests.fake_app2',
|
'django_deploy.tests.fake_app2',
|
||||||
]
|
]
|
||||||
|
|
||||||
self.assert_installed_apps(project_dir, installed_apps)
|
self.assert_installed_apps(project_dir, installed_apps)
|
||||||
|
self.assert_urlpatterns(project_dir, [])
|
||||||
|
|
||||||
def test_install_apps_with_error(self):
|
def test_install_apps_with_error(self):
|
||||||
project_dir = self._tmp_dir
|
project_dir = self._tmp_dir
|
||||||
@@ -122,6 +122,12 @@ class ProgramTestCase(DjangoDeployTestCase):
|
|||||||
]
|
]
|
||||||
self.assert_urlpatterns(project_dir, urlpatterns)
|
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):
|
def test_mount_apps_with_errors(self):
|
||||||
project_dir = self._tmp_dir
|
project_dir = self._tmp_dir
|
||||||
self._program(argv=['-c', project_dir])
|
self._program(argv=['-c', project_dir])
|
||||||
|
|||||||
Reference in New Issue
Block a user