summaryrefslogtreecommitdiffstats
path: root/tests/test_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 76b3e1b40..236f72882 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -1,18 +1,18 @@
-# -*- coding: utf-8 -*-
-from module.common import APIExerciser
-from nose.tools import nottest
+from unittest import TestCase
+from pyLoadCore import Core
+from module.common.APIExerciser import APIExerciser
-class TestApi:
+class TestApi(TestCase):
- def __init__(self):
- self.api = APIExerciser.APIExerciser(None, True, "TestUser", "sometestpw")
+ @classmethod
+ def setUpClass(cls):
+ cls.core = Core()
+ cls.core.start(False, False, True)
- def test_login(self):
- assert self.api.api.login("crapp", "wrong pw") is False
-
- #@nottest
def test_random(self):
- for i in range(0, 1000):
- self.api.testAPI()
+ api = APIExerciser(self.core)
+
+ for i in range(2000):
+ api.testAPI() \ No newline at end of file