-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
py3 support #174
py3 support #174
Conversation
tests/httplib2test.py
Outdated
@@ -1208,22 +1208,22 @@ def testExpirationModelDateAndExpiresMinFresh2(self): | |||
|
|||
def testParseWWWAuthenticateEmpty(self): | |||
res = httplib2._parse_www_authenticate({}) | |||
self.assertEqual(len(res.keys()), 0) | |||
self.assertEqual(len(list(res.keys())), 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
tests/httplib2test.py
Outdated
(response, content) = self.http.request(uri, "GET") | ||
d = self.reflector(content) | ||
self.assertTrue(d.has_key('HTTP_USER_AGENT')) | ||
self.assertTrue('HTTP_USER_AGENT' in d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
tests/httplib2test.py
Outdated
(response, content) = self.http.request(uri, "GET") | ||
self.assertEqual(response.status, 401) | ||
|
||
domain = urlparse.urlparse(base)[1] | ||
domain = urllib.parse.urlparse(base)[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
tests/httplib2test.py
Outdated
self.assertNotEqual(d['HTTP_IF_NONE_MATCH'], "fred") | ||
|
||
(response, content) = self.http.request(uri, "GET", headers = {'cache-control': 'max-age=0', 'if-none-match': 'fred'}) | ||
d = self.reflector(content) | ||
self.assertTrue(d.has_key('HTTP_IF_NONE_MATCH')) | ||
self.assertTrue('HTTP_IF_NONE_MATCH' in d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
tests/httplib2test.py
Outdated
(response, content) = self.http.request(uri, "GET") | ||
self.assertNotEqual(response['etag'], "") | ||
|
||
(response, content) = self.http.request(uri, "GET", headers = {'cache-control': 'max-age=0'}) | ||
d = self.reflector(content) | ||
self.assertTrue(d.has_key('HTTP_IF_NONE_MATCH')) | ||
self.assertTrue('HTTP_IF_NONE_MATCH' in d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
@@ -17,18 +17,18 @@ | |||
|
|||
import sys | |||
import unittest | |||
import httplib | |||
import http.client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'http.client' imported but unused
if not guess: print "I don't know anything about type", gtype | ||
else: print 'type:', guess, 'encoding:', encoding | ||
if not guess: print("I don't know anything about type", gtype) | ||
else: print('type:', guess, 'encoding:', encoding) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple statements on one line (colon)
else: | ||
guess, encoding = guess_type(gtype, strict) | ||
if not guess: print "I don't know anything about type", gtype | ||
else: print 'type:', guess, 'encoding:', encoding | ||
if not guess: print("I don't know anything about type", gtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple statements on one line (colon)
if not guess: print "I don't know anything about type", gtype | ||
else: print guess | ||
if not guess: print("I don't know anything about type", gtype) | ||
else: print(guess) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple statements on one line (colon)
@@ -586,9 +586,9 @@ def usage(code, msg=''): | |||
for gtype in args: | |||
if extension: | |||
guess = guess_extension(gtype, strict) | |||
if not guess: print "I don't know anything about type", gtype | |||
else: print guess | |||
if not guess: print("I don't know anything about type", gtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple statements on one line (colon)
@@ -1,6 +1,6 @@ | |||
#! /opt/local/bin/python | |||
import unittest | |||
from mock import patch, Mock | |||
from .mock import patch, Mock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'.mock.Mock' imported but unused
tests/test_client.py
Outdated
|
||
d = { | ||
"this is " : u"my data" | ||
"this is " : "my data" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
tests/test_client.py
Outdated
@@ -360,22 +360,22 @@ def test_encode_payload(self): | |||
"""Request body is encoded as JSON""" | |||
|
|||
d = { | |||
"this is " : u"my data \u00E0" | |||
"this is " : "my data \u00E0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
tests/test_client.py
Outdated
@@ -160,15 +160,15 @@ def test_authorization(self): | |||
|
|||
self.sg = api.Shotgun(auth_url, "foo", "bar", connect=False) | |||
self._setup_mock() | |||
self._mock_http({ 'version': [2, 4, 0, u'Dev'] }) | |||
self._mock_http({ 'version': [2, 4, 0, 'Dev'] }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace after '{'
whitespace before '}'
tests/test_api.py
Outdated
|
||
class TestShotgunApi(base.LiveTestBase): | ||
def setUp(self): | ||
super(TestShotgunApi, self).setUp() | ||
# give note unicode content | ||
self.sg.update('Note', self.note['id'], {'content':u'La Pe\xf1a'}) | ||
self.sg.update('Note', self.note['id'], {'content':'La Pe\xf1a'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ':'
import urlparse | ||
import urllib2 | ||
import urllib.parse | ||
import urllib.request, urllib.error, urllib.parse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple imports on one line
@@ -8,24 +8,24 @@ | |||
import sys | |||
import os | |||
import re | |||
from mock import patch, Mock, MagicMock | |||
from .mock import patch, Mock, MagicMock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'.mock.Mock' imported but unused
tests/httplib2test.py
Outdated
(response, content) = self.http.request(uri, "GET") | ||
self.assertNotEqual(response['etag'], "") | ||
|
||
(response, content) = self.http.request(uri, "GET", headers = {'cache-control': 'max-age=0'}) | ||
d = self.reflector(content) | ||
self.assertTrue(d.has_key('HTTP_IF_NONE_MATCH')) | ||
self.assertTrue('HTTP_IF_NONE_MATCH' in d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
tests/tests_unit.py
Outdated
grouping = ['something'] | ||
kws = {'grouping':grouping} | ||
kws = {'grouping':grouping} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ':'
|
||
def test_malformatted_proxy_info(self): | ||
proxy_server = "someserver.com" | ||
proxy_port = 1234 | ||
proxy_user = "user" | ||
proxy_pass = "password" | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'http_proxy' is assigned to but never used
@@ -208,7 +208,7 @@ def test_user_agent(self): | |||
args, _ = self.sg._http_request.call_args | |||
(_, _, _, headers) = args | |||
expected = "shotgun-json (%s); Python %s (%s); ssl %s (%s)" % ( | |||
api.__version__, | |||
api.__version__, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for hanging indent
@@ -194,7 +194,7 @@ def test_user_agent(self): | |||
args, _ = self.sg._http_request.call_args | |||
(_, _, _, headers) = args | |||
expected = "shotgun-json (%s); Python %s (%s); ssl %s (%s); test-agent" % ( | |||
api.__version__, | |||
api.__version__, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for hanging indent
@@ -180,7 +180,7 @@ def test_user_agent(self): | |||
(_, _, _, headers) = args | |||
ssl_validate_lut = {True: "no-validate", False: "validate"} | |||
expected = "shotgun-json (%s); Python %s (%s); ssl %s (%s)" % ( | |||
api.__version__, | |||
api.__version__, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for hanging indent
tests/test_api.py
Outdated
result = self.sg.following(self.human_user, | ||
project={"type":"Project", "id":task_project_id}, | ||
result = self.sg.following(self.human_user, | ||
project={"type":"Project", "id":task_project_id}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
missing whitespace after ':'
tests/test_api.py
Outdated
result = self.sg.following(self.human_user, | ||
project={"type":"Project", "id":shot_project_id}, | ||
result = self.sg.following(self.human_user, | ||
project={"type":"Project", "id":shot_project_id}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
missing whitespace after ':'
tests/httplib2test.py
Outdated
res = httplib2._parse_www_authenticate({ 'www-authenticate': | ||
'Digest realm="[email protected]", qop \t=\t"\tauth,auth-int", nonce="(*)&^&$%#",opaque="5ccc069c403ebaf9f0171e9517f40e41", Basic REAlm="me", WSSE realm="foo", profile="UsernameToken"'}) | ||
res = httplib2._parse_www_authenticate({ 'www-authenticate': | ||
'Digest realm="[email protected]", qop \t=\t"\tauth,auth-int", nonce="(*)&^&$%#",opaque="5ccc069c403ebaf9f0171e9517f40e41", Basic REAlm="me", WSSE realm="foo", profile="UsernameToken"'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
tests/httplib2test.py
Outdated
@@ -1307,8 +1307,8 @@ def testParseWWWAuthenticateMultiple3(self): | |||
self.assertEqual('UsernameToken', wsse['profile']) | |||
|
|||
def testParseWWWAuthenticateMultiple4(self): | |||
res = httplib2._parse_www_authenticate({ 'www-authenticate': | |||
'Digest realm="[email protected]", qop \t=\t"\tauth,auth-int", nonce="(*)&^&$%#",opaque="5ccc069c403ebaf9f0171e9517f40e41", Basic REAlm="me", WSSE realm="foo", profile="UsernameToken"'}) | |||
res = httplib2._parse_www_authenticate({ 'www-authenticate': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace after '{'
tests/tests_unit.py
Outdated
@@ -389,7 +389,7 @@ def test_invalid(self): | |||
|
|||
filters = [{ | |||
"filter_operator": "all", | |||
"filters": { "bogus": "bogus" } | |||
"filters": {"bogus": "bogus" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
tests/tests_unit.py
Outdated
{ "path": "sg_status_list", "relation": "is", "values": ["hld"] }, | ||
{ "path": "assets", "relation": "is", "values": [ { "type": "Asset", "id": 9 } ] }, | ||
{"path": "sg_status_list", "relation": "is", "values": ["hld"] }, | ||
{"path": "assets", "relation": "is", "values": [{"type": "Asset", "id": 9 } ] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
whitespace before ']'
tests/tests_unit.py
Outdated
{ | ||
"logical_operator": "and", | ||
"conditions": [ | ||
{ "path": "sg_status_list", "relation": "is", "values": ["hld"] }, | ||
{ "path": "assets", "relation": "is", "values": [ { "type": "Asset", "id": 9 } ] }, | ||
{"path": "sg_status_list", "relation": "is", "values": ["hld"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
tests/tests_unit.py
Outdated
{ "path": "sg_status_list", "relation": "is", "values": ["ip"] }, | ||
{ "path": "sg_status_list", "relation": "is", "values": ["fin"] }, | ||
{"path": "sg_status_list", "relation": "is", "values": ["ip"] }, | ||
{"path": "sg_status_list", "relation": "is", "values": ["fin"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
tests/tests_unit.py
Outdated
{ | ||
"logical_operator": "or", | ||
"conditions": [ | ||
{ "path": "sg_status_list", "relation": "is", "values": ["ip"] }, | ||
{ "path": "sg_status_list", "relation": "is", "values": ["fin"] }, | ||
{"path": "sg_status_list", "relation": "is", "values": ["ip"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
tests/tests_unit.py
Outdated
|
||
# Test both styles of passing arrays | ||
def test_arrays(self): | ||
expected = { | ||
"logical_operator": "and", | ||
"conditions": [ | ||
{ "path": "code", "relation": "in", "values": ["test1", "test2", "test3"] } | ||
{"path": "code", "relation": "in", "values": ["test1", "test2", "test3"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
tests/tests_unit.py
Outdated
{ "path": "code", "relation": "is", "values": ["test"] }, | ||
{ "path": "sg_status_list", "relation": "is", "values": ["ip"] } | ||
{"path": "code", "relation": "is", "values": ["test"] }, | ||
{"path": "sg_status_list", "relation": "is", "values": ["ip"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
tests/tests_unit.py
Outdated
@@ -296,20 +296,20 @@ def test_simple(self): | |||
expected = { | |||
"logical_operator": "or", | |||
"conditions": [ | |||
{ "path": "code", "relation": "is", "values": ["test"] }, | |||
{ "path": "sg_status_list", "relation": "is", "values": ["ip"] } | |||
{"path": "code", "relation": "is", "values": ["test"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
|
||
def test_malformatted_proxy_info(self): | ||
proxy_server = "someserver.com" | ||
proxy_port = 1234 | ||
proxy_user = "user" | ||
proxy_pass = "password" | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'http_proxy' is assigned to but never used
tests/test_client.py
Outdated
d = { "results" : ["foo", "bar"] } | ||
a = { "utf_str": "\xe2\x88\x9a", "unicode_str": "\xe2\x88\x9a".decode("utf-8") } | ||
d = {"results" : ["foo", "bar"] } | ||
a = {"utf_str": "\xe2\x88\x9a", "unicode_str": "\xe2\x88\x9a".decode("utf-8") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before '}'
|
||
def test_malformatted_proxy_info(self): | ||
proxy_server = "someserver.com" | ||
proxy_port = 1234 | ||
proxy_user = "user" | ||
proxy_pass = "password" | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'http_proxy' is assigned to but never used
tests/test_client.py
Outdated
|
||
# Test unicode mixed with utf-8 as reported in Ticket #17959 | ||
d = { "results" : ["foo", "bar"] } | ||
a = { "utf_str": "\xe2\x88\x9a", "unicode_str": "\xe2\x88\x9a".decode("utf-8") } | ||
d = {"results" : ["foo", "bar"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
tests/test_client.py
Outdated
|
||
d = { "results" : ["foo", "bar"] } | ||
d = {"results" : ["foo", "bar"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
tests/test_client.py
Outdated
|
||
d = { "results" : ["foo", "bar"] } | ||
d = {"results" : ["foo", "bar"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
tests/test_client.py
Outdated
|
||
d = { "results" : {"singleton" : "result"} } | ||
d = {"results" : {"singleton" : "result"}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
tests/test_client.py
Outdated
self.assertEqual("Go BANG", str(e)) | ||
|
||
def test_call_rpc(self): | ||
"""Named rpc method is called and results handled""" | ||
|
||
d = { "no-results" : "data without a results key" } | ||
d = {"no-results" : "data without a results key"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
tests/test_client.py
Outdated
self._mock_http({ "message":"Go BANG", | ||
"exception":True }) | ||
self._mock_http({"message":"Go BANG", | ||
"exception":True}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
missing whitespace after ':'
tests/test_client.py
Outdated
@@ -248,56 +248,56 @@ def test_http_error(self): | |||
def test_rpc_error(self): | |||
"""RPC error transformed into Python error""" | |||
|
|||
self._mock_http({ "message":"Go BANG", | |||
"exception":True }) | |||
self._mock_http({"message":"Go BANG", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ':'
tests/test_client.py
Outdated
self._mock_http({ "message":"Go BANG", | ||
"exception":True }) | ||
self._mock_http({"message":"Go BANG", | ||
"exception":True}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
missing whitespace after ':'
|
||
def test_malformatted_proxy_info(self): | ||
proxy_server = "someserver.com" | ||
proxy_port = 1234 | ||
proxy_user = "user" | ||
proxy_pass = "password" | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'http_proxy' is assigned to but never used
tests/test_client.py
Outdated
|
||
d = { "results" : ["foo", "bar"] } | ||
d = {"results" : ["foo", "bar"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
self._mock_http({ "message":"Go BANG", | ||
"exception":True }) | ||
self._mock_http({"message": "Go BANG", | ||
"exception": True}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
self._mock_http({ "message":"Go BANG", | ||
"exception":True }) | ||
self._mock_http({"message": "Go BANG", | ||
"exception": True}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
self._mock_http({ "message":"Go BANG", | ||
"exception":True }) | ||
self._mock_http({"message": "Go BANG", | ||
"exception": True}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
tests/test_client.py
Outdated
self.assertRaises(api.ShotgunError, sc._ensure_json_supported) | ||
self.assertRaises(api.ShotgunError, ServerCapabilities, "foo", | ||
{"version" : (2,2,0)}) | ||
{"version" : (2, 2, 0)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
whitespace before ':'
…py ./shotgun_api3/shotgun.py ./shotgun_api3/lib/*.py
|
||
def test_malformatted_proxy_info(self): | ||
proxy_server = "someserver.com" | ||
proxy_port = 1234 | ||
proxy_user = "user" | ||
proxy_pass = "password" | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'http_proxy' is assigned to but never used
"project": self.project } | ||
batch_data.append( {"request_type": "create", | ||
data = {"code": "%s Text Search %s" % (self._prefix, i), | ||
"project": self.project} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
time.sleep(1) | ||
|
||
sg.update_project_last_accessed(self.project) | ||
|
||
current = sg.find_one('Project', [['id','is',self.project['id']]], ['last_accessed_by_current_user']) | ||
self.assertNotEqual( initial, current ) | ||
current = sg.find_one('Project', [['id', 'is', self.project['id']]], ['last_accessed_by_current_user']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple spaces after operator
self.config.script_name, | ||
self.config.api_key, | ||
http_proxy=self.config.http_proxy, | ||
sudo_as_login=self.config.human_login ) | ||
sudo_as_login=self.config.human_login) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
time.sleep(1) | ||
|
||
# this instance of the api is not logged in as a user | ||
self.sg.update_project_last_accessed(self.project, user=self.human_user) | ||
|
||
current = sg.find_one('Project', [['id','is',self.project['id']]], ['last_accessed_by_current_user']) | ||
self.assertNotEqual( initial, current ) | ||
current = sg.find_one('Project', [['id', 'is', self.project['id']]], ['last_accessed_by_current_user']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple spaces after operator
login=self.config.human_login, | ||
password=self.config.human_password, | ||
http_proxy=self.config.http_proxy ) | ||
http_proxy=self.config.http_proxy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
|
||
sg.update_project_last_accessed(self.project) | ||
|
||
current = sg.find_one('Project', [['id','is',self.project['id']]], ['last_accessed_by_current_user']) | ||
self.assertNotEqual( initial, current ) | ||
current = sg.find_one('Project', [['id', 'is', self.project['id']]], ['last_accessed_by_current_user']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple spaces after operator
@@ -1898,7 +1898,7 @@ def test_humanuser_upload_thumbnail_for_version(self): | |||
|
|||
# clear thumbnail | |||
response_clear_thumbnail = self.sg.update("Version", | |||
self.version['id'], {'image':None}) | |||
self.version['id'], {'image': None}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
|
||
def test_malformatted_proxy_info(self): | ||
proxy_server = "someserver.com" | ||
proxy_port = 1234 | ||
proxy_user = "user" | ||
proxy_pass = "password" | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, | ||
http_proxy = "%s:%s@%s:%d" % (proxy_user, proxy_pass, proxy_server, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'http_proxy' is assigned to but never used
"project": self.project } | ||
batch_data.append( {"request_type": "create", | ||
data = {"code": "%s Text Search %s" % (self._prefix, i), | ||
"project": self.project} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
time.sleep(1) | ||
|
||
sg.update_project_last_accessed(self.project) | ||
|
||
current = sg.find_one('Project', [['id','is',self.project['id']]], ['last_accessed_by_current_user']) | ||
self.assertNotEqual( initial, current ) | ||
current = sg.find_one('Project', [['id', 'is', self.project['id']]], ['last_accessed_by_current_user']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple spaces after operator
self.config.script_name, | ||
self.config.api_key, | ||
http_proxy=self.config.http_proxy, | ||
sudo_as_login=self.config.human_login ) | ||
sudo_as_login=self.config.human_login) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
time.sleep(1) | ||
|
||
# this instance of the api is not logged in as a user | ||
self.sg.update_project_last_accessed(self.project, user=self.human_user) | ||
|
||
current = sg.find_one('Project', [['id','is',self.project['id']]], ['last_accessed_by_current_user']) | ||
self.assertNotEqual( initial, current ) | ||
current = sg.find_one('Project', [['id', 'is', self.project['id']]], ['last_accessed_by_current_user']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple spaces after operator
login=self.config.human_login, | ||
password=self.config.human_password, | ||
http_proxy=self.config.http_proxy ) | ||
http_proxy=self.config.http_proxy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for visual indent
|
||
sg.update_project_last_accessed(self.project) | ||
|
||
current = sg.find_one('Project', [['id','is',self.project['id']]], ['last_accessed_by_current_user']) | ||
self.assertNotEqual( initial, current ) | ||
current = sg.find_one('Project', [['id', 'is', self.project['id']]], ['last_accessed_by_current_user']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple spaces after operator
@@ -1898,7 +1898,7 @@ def test_humanuser_upload_thumbnail_for_version(self): | |||
|
|||
# clear thumbnail | |||
response_clear_thumbnail = self.sg.update("Version", | |||
self.version['id'], {'image':None}) | |||
self.version['id'], {'image': None}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line under-indented for visual indent
Thanks for sending this to us, @rane-hs, but we're not going to be able to merge this in as things stand right now. We're planning to align with the VFX Platform schedule for supporting Python 3.x. As that timeline progresses, we'll be offering the same kinds of developer previews as are planned for other VFX Platform applications. You can keep an eye on the shotgun-dev email list in the meantime, as any updates regarding specific dates will be posted there when we know them. |
#154
auto formattting
using autopep8 : https://github.com/hhatto/autopep8
breaking backward compatibility : python2
execute
2to3 -w ./
converting whole file to changing py3 implementationbreaking backward compatibility : choose_boundary
chose_boundary is no longer available in python3
https://stackoverflow.com/questions/27099290/where-is-mimetools-choose-boundary-function-in-python3?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
switching
make_boundary
or using converted function https://gist.github.com/rane-hs/40b36be270797fe23480885341121d85