From f8cf65d4271254dd89662cb6190adc5b426c6d2b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 12 May 2015 02:44:03 +0200 Subject: 'from time' -> 'import time' and so on... (2) --- tests/test_json.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/test_json.py') diff --git a/tests/test_json.py b/tests/test_json.py index 82a2a3d07..de2914182 100644 --- a/tests/test_json.py +++ b/tests/test_json.py @@ -1,11 +1,11 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import json +import logging import urllib import urllib2 -from json import loads -from logging import log url = "http://localhost:8001/api/%s" @@ -16,18 +16,18 @@ class TestJson(object): if not post: post = {} post['session'] = self.key u = urllib2.urlopen(url % name, data=urlencode(post)) - return loads(u.read()) + return json.loads(u.read()) def setUp(self): u = urllib2.urlopen(url % "login", data=urlencode({"username": "TestUser", "password": "pwhere"})) - self.key = loads(u.read()) + self.key = json.loads(u.read()) assert self.key is not False def test_wronglogin(self): u = urllib2.urlopen(url % "login", data=urlencode({"username": "crap", "password": "wrongpw"})) - assert loads(u.read()) is False + assert json.loads(u.read()) is False def test_access(self): @@ -41,7 +41,7 @@ class TestJson(object): def test_status(self): ret = self.call("statusServer") - log(1, str(ret)) + logging.log(1, str(ret)) assert "pause" in ret assert "queue" in ret -- cgit v1.2.3