]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
Remove obsolete tests and fix existing tests.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Fri, 10 May 2019 22:14:56 +0000 (22:14 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Fri, 10 May 2019 22:14:56 +0000 (22:14 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2817 7aebc617-e5e2-0310-91dc-80fb5f6d2477

tests/__init__.py [new file with mode: 0644]
tests/functional/__init__.py [deleted file]
tests/functional/test_bericht.py [deleted file]
tests/functional/test_coordtool.py [deleted file]
tests/functional/test_rodelbahn.py [deleted file]
tests/functional/test_wrgpxtool.py [deleted file]
tests/test_lib.py
tests/test_wradmin.py

diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/functional/__init__.py b/tests/functional/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/functional/test_bericht.py b/tests/functional/test_bericht.py
deleted file mode 100644 (file)
index 57b88ec..0000000
+++ /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 (file)
index a7c46a3..0000000
+++ /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 (file)
index 4053de3..0000000
+++ /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 (file)
index db22a41..0000000
+++ /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...
index f73fc537c865658fdf62233cbdc77f942a05fca6..a7fb33db9d26e72f862923d7b09cfe0fac07e85a 100644 (file)
@@ -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))
index 53b6fe464f57426fc457c93e9cc014cf7fb576a0..67505b3d4b57d4ccee8ebac9f0cff26b304b18cf 100644 (file)
@@ -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