Created
January 28, 2019 08:37
-
-
Save rupython/881db5bceaeb628f34c02dc519f793b0 to your computer and use it in GitHub Desktop.
From: Ravil
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self = <test.TestBuild testMethod=test_build_b> | |
def test_build_b(self): | |
query = """UPDATE domains_meta SET """ | |
bad_data = [['888888888877777777776666666666555555555544', '', [], query], | |
['%', 'test', [], query]] | |
for ass in bad_data: | |
with self.assertRaises(ValueError): | |
> result = build_b(*ass) | |
test.py:197: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
def build_b(a, session_bypass_cookie, params, query): | |
b_regexp = re.compile('([A-Za-z0-9_]){0,40}') | |
print('a:', a) | |
if a == '': | |
b = None | |
elif len(a) > 40 or not bypass_cookie_regexp.match(a): | |
print("Wrong a length") | |
raise ValueError() | |
> if b != c: | |
E UnboundLocalError: local variable 'b' referenced before assignment | |
build.py:223: UnboundLocalError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment