Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def mocked_urlopen(url):
ok_(url.startswith('https://'))
if 'style1.css' in url:
return MockResponse(
"h1 { color: brown }"
)
if 'style2.css' in url:
return MockResponse(
"h2 { color: pink }"
)
if 'style3.css' in url:
return MockResponse(
"h3 { color: red }", gzip=True
)
def mocked_urlopen(url):
if 'style1.css' in url:
return MockResponse(
"h1 { color: brown }"
)
if 'style2.css' in url:
return MockResponse(
"h2 { color: pink }"
)
if 'style3.css' in url:
return MockResponse(
"h3 { color: red }", gzip=True
)
def mocked_urlopen(url):
ok_(url.startswith('https://'))
if 'style1.css' in url:
return MockResponse(
"h1 { color: brown }"
)
if 'style2.css' in url:
return MockResponse(
"h2 { color: pink }"
)
if 'style3.css' in url:
return MockResponse(
"h3 { color: red }", gzip=True
)
def mocked_urlopen(url):
if 'style1.css' in url:
return MockResponse(
"h1 { color: brown }"
)
if 'style2.css' in url:
return MockResponse(
"h2 { color: pink }"
)
if 'style3.css' in url:
return MockResponse(
"h3 { color: red }", gzip=True
)
def mocked_urlopen(url):
if url == 'http://www.peterbe.com/style.css':
return MockResponse(
"h1 { color: brown }"
)
raise NotImplementedError(url)
def mocked_urlopen(url):
if 'style1.css' in url:
return MockResponse(
"h1 { color: brown }"
)
if 'style2.css' in url:
return MockResponse(
"h2 { color: pink }"
)
if 'style3.css' in url:
return MockResponse(
"h3 { color: red }", gzip=True
)
def mocked_urlopen(url):
ok_(url.startswith('https://'))
if 'style1.css' in url:
return MockResponse(
"h1 { color: brown }"
)
if 'style2.css' in url:
return MockResponse(
"h2 { color: pink }"
)
if 'style3.css' in url:
return MockResponse(
"h3 { color: red }", gzip=True
)