From: philipp Date: Fri, 10 May 2019 22:14:56 +0000 (+0000) Subject: Remove obsolete tests and fix existing tests. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wradmin.git/commitdiff_plain/9c9fbb1d5a1294da56aea82cc4ce5216062d9960 Remove obsolete tests and fix existing tests. git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2817 7aebc617-e5e2-0310-91dc-80fb5f6d2477 --- diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/functional/__init__.py b/tests/functional/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/functional/test_bericht.py b/tests/functional/test_bericht.py deleted file mode 100644 index 57b88ec..0000000 --- a/tests/functional/test_bericht.py +++ /dev/null @@ -1,11 +0,0 @@ -from wradmin.tests import * - -class TestBerichtController(TestController): - - def test_list(self): - response = self.app.get(url(controller='bericht', action='list')) - # Test response... - - def test_view(self): - response = self.app.get(url(controller='bericht', action='view', id=100)) - # Test response... diff --git a/tests/functional/test_coordtool.py b/tests/functional/test_coordtool.py deleted file mode 100644 index a7c46a3..0000000 --- a/tests/functional/test_coordtool.py +++ /dev/null @@ -1,7 +0,0 @@ -from wradmin.tests import * - -class TestCoordtoolController(TestController): - - def test_index(self): - response = self.app.get(url(controller='coordtool', action='index')) - # Test response... diff --git a/tests/functional/test_rodelbahn.py b/tests/functional/test_rodelbahn.py deleted file mode 100644 index 4053de3..0000000 --- a/tests/functional/test_rodelbahn.py +++ /dev/null @@ -1,17 +0,0 @@ -from wradmin.tests import * - -class TestRodelbahnController(TestController): - - def test_index(self): - response = self.app.get(url(controller='rodelbahn', action='index')) - # Test response... - - - def test_list(self): - response = self.app.get(url(controller='rodelbahn', action='list')) - # Test response... - - - def test_view(self): - response = self.app.get(url(controller='rodelbahn', action='view', id=5)) - # Test response... \ No newline at end of file diff --git a/tests/functional/test_wrgpxtool.py b/tests/functional/test_wrgpxtool.py deleted file mode 100644 index db22a41..0000000 --- a/tests/functional/test_wrgpxtool.py +++ /dev/null @@ -1,7 +0,0 @@ -from wradmin.tests import * - -class TestWrgpxtoolController(TestController): - - def test_index(self): - response = self.app.get(url(controller='wrgpxtool', action='index')) - # Test response... diff --git a/tests/test_lib.py b/tests/test_lib.py index f73fc53..a7fb33d 100644 --- a/tests/test_lib.py +++ b/tests/test_lib.py @@ -1,24 +1,17 @@ #!/usr/bin/python3.4 # $Id$ import unittest -import wradmin.lib -import wradmin.lib.mediawiki -import wradmin.model +import wradmin.auth class TestMediaWikiUsers(unittest.TestCase): - @unittest.skip - def test_mediawiki_users(self): - users = wradmin.lib.mediawiki.MediaWikiUsers(True) - assert len(users.usernames) >= 1 # We have at least one user - def test_mediawiki_users_has_password_is_correct_b(self): password_db = ':B:d25b2886:41e46c952790b1b442aac4f24f7ea7a8' # 'abc' - self.assertTrue(wradmin.lib.mediawiki.MediaWikiUsers.password_is_correct('abc', password_db)) - self.assertFalse(wradmin.lib.mediawiki.MediaWikiUsers.password_is_correct('abcd', password_db)) + self.assertTrue(wradmin.auth.password_is_correct('abc', password_db)) + self.assertFalse(wradmin.auth.password_is_correct('abcd', password_db)) def test_mediawiki_users_has_password_is_correct_pbkdf2(self): password_db = ':pbkdf2:sha256:10000:128:EXgVGhc2mAs710feKvkiaw==:J5fYth9pg/R2d0F8bSsYfTR8SBpTBNIcdv/DgJ0tOPC1rtajl2Dr0RLqOozLb8O0XpDhtv4a3JJd/M0b58WebfNWAcdJBJI9nNeC0EYYD7OCYZGVAaRhiYtK4m53KZBBL6x/k2j4RjHPT1NmgV8Fr1DPqBNOlOHxUIh5z5oslM4=' # 'abc' - self.assertTrue(wradmin.lib.mediawiki.MediaWikiUsers.password_is_correct('abc', password_db)) - self.assertFalse(wradmin.lib.mediawiki.MediaWikiUsers.password_is_correct('abcd', password_db)) + self.assertTrue(wradmin.auth.password_is_correct('abc', password_db)) + self.assertFalse(wradmin.auth.password_is_correct('abcd', password_db)) diff --git a/tests/test_wradmin.py b/tests/test_wradmin.py index 53b6fe4..67505b3 100644 --- a/tests/test_wradmin.py +++ b/tests/test_wradmin.py @@ -1,7 +1,3 @@ -"""How to test wradmin: - -WRADMIN_SETTINGS=../wradmin/test.cfg python3 -m unittest tests.test_wradmin -""" import unittest import bs4 # beautiful soup import wradmin.model