Merge "Swith to unicode for whole testrail" into stable/mitaka

This commit is contained in:
Jenkins 2016-04-12 15:22:10 +00:00 committed by Gerrit Code Review
commit 83e922f5d0
10 changed files with 24 additions and 6 deletions

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import unicode_literals
import json
import re

View File

@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import unicode_literals
import json
import os
import re
@ -181,8 +183,7 @@ class TestRunStatistics(object):
self.run['name'], self.run['config'] or 'default config'))
for test in self.tests:
logger.debug('Checking "{0}" test...'.format(
test['title'].encode('utf8')))
logger.debug('Checking "{0}" test...'.format(test['title']))
test_results = sorted(
self.project.get_results_for_test(test['id'], self.results),
key=lambda x: x['id'], reverse=True)
@ -359,7 +360,7 @@ class StatisticsGenerator(object):
index = 1
for tid, params in values['tests'].items():
if index > 1:
link_text = str(index)
link_text = '{}'.format(index)
else:
link_text = '{0} on {1}'.format(params['group'],
params['config'])
@ -396,7 +397,7 @@ class StatisticsGenerator(object):
index = 1
for tid, params in values['tests'].items():
if index > 1:
link_text = str(index)
link_text = '{}'.format(index)
else:
link_text = '{0} on {1}'.format(params['group'],
params['config'])

View File

@ -15,6 +15,7 @@
# under the License.
from __future__ import division
from __future__ import unicode_literals
import functools
import re

View File

@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import unicode_literals
import json
from logging import DEBUG

View File

@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import unicode_literals
import optparse
from xml.etree import ElementTree

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import unicode_literals
import logging
import os

View File

@ -23,6 +23,8 @@
# Copyright Gurock Software GmbH. See license.md for details.
#
from __future__ import unicode_literals
import base64
import json
import time
@ -114,8 +116,8 @@ class APIClient(object):
if method == 'POST':
request.add_data(json.dumps(data))
auth = base64.encodestring(
'%s:%s' % (self.user, self.password)).strip()
request.add_header('Authorization', 'Basic %s' % auth)
'{0}:{1}'.format(self.user, self.password)).strip()
request.add_header('Authorization', 'Basic {}'.format(auth))
request.add_header('Content-Type', 'application/json')
e = None

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import unicode_literals
from fuelweb_test.testrail.settings import logger
from fuelweb_test.testrail.testrail import APIClient
from fuelweb_test.testrail.testrail import APIError

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import unicode_literals
import re
from logging import DEBUG

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import unicode_literals
import subprocess
from joblib import Parallel, delayed