diff options
Diffstat (limited to 'service/test')
| -rw-r--r-- | service/test/functional/features/steps/login.py | 10 | ||||
| -rw-r--r-- | service/test/support/test_helper.py | 4 | ||||
| -rw-r--r-- | service/test/unit/config/test_sessions.py | 2 | 
3 files changed, 13 insertions, 3 deletions
| diff --git a/service/test/functional/features/steps/login.py b/service/test/functional/features/steps/login.py index e2dc1381..2a653030 100644 --- a/service/test/functional/features/steps/login.py +++ b/service/test/functional/features/steps/login.py @@ -13,8 +13,16 @@  #  # You should have received a copy of the GNU Affero General Public License  # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. +import time +  from behave import when, then -from common import * +from selenium.webdriver.common.by import By + +from common import ( +    fill_by_css_selector, +    find_element_by_css_selector, +    MULTI_USER_URL, +    wait_until_element_is_visible_by_locator)  @when(u'I open the login page') diff --git a/service/test/support/test_helper.py b/service/test/support/test_helper.py index 3323a14e..fbff5819 100644 --- a/service/test/support/test_helper.py +++ b/service/test/support/test_helper.py @@ -100,7 +100,7 @@ class TestRequest:  class PixRequestMock(DummyRequest):      def __init__(self, path):          DummyRequest.__init__(self, path) -        self.path = "/".join(path) +        self.path = '/' + "/".join(path)          self.content = None          self.code = None          self.cookies = {} @@ -121,7 +121,7 @@ class PixRequestMock(DummyRequest):  def request_mock(path='', method='GET', body='', headers={}, ajax=True, csrf='token'): -    dummy = PixRequestMock(path.split('/')) +    dummy = PixRequestMock(path[1:].split('/'))      for name, val in headers.iteritems():          dummy.requestHeaders.setRawHeaders(name.lower(), [val])      dummy.method = method diff --git a/service/test/unit/config/test_sessions.py b/service/test/unit/config/test_sessions.py index 98e5c69e..a7e62c7a 100644 --- a/service/test/unit/config/test_sessions.py +++ b/service/test/unit/config/test_sessions.py @@ -14,9 +14,11 @@  # You should have received a copy of the GNU Affero General Public License  # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. +import os  from mock import patch  from mock import MagicMock  from twisted.internet import defer +from twisted.trial import unittest  from pixelated.config.sessions import LeapSession, SessionCache  from test.unit.bitmask_libraries.test_abstract_leap import AbstractLeapTest | 
