Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_post_parse_octothorpe(self):
v = self.v
v.operator = '#'
v.post_parse()
self.assertEqual(v.join_str, ',')
self.assertEqual(v.safe, variable.URIVariable.reserved)
self.assertEqual(v.start, '#')
only makes sense to do it in a more easily testable way.
"""
self.safe = ''
self.start = self.join_str = self.operator
if self.operator == '+':
self.start = ''
if self.operator in ('+', '#', ''):
self.join_str = ','
if self.operator == '#':
self.start = '#'
if self.operator == '?':
self.start = '?'
self.join_str = '&'
if self.operator in ('+', '#'):
self.safe = URIVariable.reserved