def test_no_auth(self): """ Test url with no user info component. Expected result: output is identical to input. """ url = 'amqps://test.server' result = url self.assertEqual(clean_url(url), result)
def test_kitchen_sink(self): """ Test url all components. Expected result: output has the password replaced with 6 asterisks. """ url = 'amqps://*****:*****@test.server:1234/?queryparam=1&abc=2#anchor' result = 'amqps://*****:*****@test.server:1234/?queryparam=1&abc=2#anchor' self.assertEqual(clean_url(url), result)
def test_no_port(self): """ Test url with no user info component. Expected result: output has the password replaced with 6 asterisks. """ url = 'amqps://*****:*****@test.server/' result = 'amqps://*****:*****@test.server/' self.assertEqual(clean_url(url), result)