Merge "Swith to unicode for whole testrail" into stable/mitaka
This commit is contained in:
commit
83e922f5d0
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -181,8 +183,7 @@ class TestRunStatistics(object):
|
|||||||
self.run['name'], self.run['config'] or 'default config'))
|
self.run['name'], self.run['config'] or 'default config'))
|
||||||
|
|
||||||
for test in self.tests:
|
for test in self.tests:
|
||||||
logger.debug('Checking "{0}" test...'.format(
|
logger.debug('Checking "{0}" test...'.format(test['title']))
|
||||||
test['title'].encode('utf8')))
|
|
||||||
test_results = sorted(
|
test_results = sorted(
|
||||||
self.project.get_results_for_test(test['id'], self.results),
|
self.project.get_results_for_test(test['id'], self.results),
|
||||||
key=lambda x: x['id'], reverse=True)
|
key=lambda x: x['id'], reverse=True)
|
||||||
@ -359,7 +360,7 @@ class StatisticsGenerator(object):
|
|||||||
index = 1
|
index = 1
|
||||||
for tid, params in values['tests'].items():
|
for tid, params in values['tests'].items():
|
||||||
if index > 1:
|
if index > 1:
|
||||||
link_text = str(index)
|
link_text = '{}'.format(index)
|
||||||
else:
|
else:
|
||||||
link_text = '{0} on {1}'.format(params['group'],
|
link_text = '{0} on {1}'.format(params['group'],
|
||||||
params['config'])
|
params['config'])
|
||||||
@ -396,7 +397,7 @@ class StatisticsGenerator(object):
|
|||||||
index = 1
|
index = 1
|
||||||
for tid, params in values['tests'].items():
|
for tid, params in values['tests'].items():
|
||||||
if index > 1:
|
if index > 1:
|
||||||
link_text = str(index)
|
link_text = '{}'.format(index)
|
||||||
else:
|
else:
|
||||||
link_text = '{0} on {1}'.format(params['group'],
|
link_text = '{0} on {1}'.format(params['group'],
|
||||||
params['config'])
|
params['config'])
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import re
|
import re
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from logging import DEBUG
|
from logging import DEBUG
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import optparse
|
import optparse
|
||||||
from xml.etree import ElementTree
|
from xml.etree import ElementTree
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
# Copyright Gurock Software GmbH. See license.md for details.
|
# Copyright Gurock Software GmbH. See license.md for details.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
@ -114,8 +116,8 @@ class APIClient(object):
|
|||||||
if method == 'POST':
|
if method == 'POST':
|
||||||
request.add_data(json.dumps(data))
|
request.add_data(json.dumps(data))
|
||||||
auth = base64.encodestring(
|
auth = base64.encodestring(
|
||||||
'%s:%s' % (self.user, self.password)).strip()
|
'{0}:{1}'.format(self.user, self.password)).strip()
|
||||||
request.add_header('Authorization', 'Basic %s' % auth)
|
request.add_header('Authorization', 'Basic {}'.format(auth))
|
||||||
request.add_header('Content-Type', 'application/json')
|
request.add_header('Content-Type', 'application/json')
|
||||||
|
|
||||||
e = None
|
e = None
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from fuelweb_test.testrail.settings import logger
|
from fuelweb_test.testrail.settings import logger
|
||||||
from fuelweb_test.testrail.testrail import APIClient
|
from fuelweb_test.testrail.testrail import APIClient
|
||||||
from fuelweb_test.testrail.testrail import APIError
|
from fuelweb_test.testrail.testrail import APIError
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from logging import DEBUG
|
from logging import DEBUG
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from joblib import Parallel, delayed
|
from joblib import Parallel, delayed
|
||||||
|
Loading…
Reference in New Issue
Block a user