diff options
| author | 2012-09-18 17:59:50 +0200 | |
|---|---|---|
| committer | 2012-09-18 17:59:50 +0200 | |
| commit | 6130a2377ca6754fee88773097ce220abef1aa47 (patch) | |
| tree | 76bea0d76393100fcf393c164c96d34f286aba7a /tests/test_api.py | |
| parent | Added DuckcryptInfo decrypter, smaller fixes (diff) | |
| parent | dropdowns in navbar (diff) | |
| download | pyload-6130a2377ca6754fee88773097ce220abef1aa47.tar.xz | |
merged stable into default
Diffstat (limited to 'tests/test_api.py')
| -rw-r--r-- | tests/test_api.py | 24 | 
1 files changed, 11 insertions, 13 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index f8901f731..0171b46bb 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,20 +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", "pwhere") +    @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 - -    #takes really long, only test when needed -    @nottest      def test_random(self): +        api = APIExerciser(self.core) -        for i in range(0, 100): -            self.api.testAPI() +        for i in range(2000): +            api.testAPI()  | 
