def test_match_with_matching_username(self): self.assertEqual( get_credentials_from_store(b'https', b'example.org', b'user', fnames=[self.fname]), (b'user', b'pass'))
def test_no_match_with_nonmatching_username(self): self.assertEqual( get_credentials_from_store(b'https', b'example.org', b'otheruser', fnames=[self.fname]), None)
def test_nonmatching_hostname(self): self.assertEqual( get_credentials_from_store(b'https', b'noentry.org', fnames=[self.fname]), None)
def test_nonmatching_scheme(self): self.assertEqual( get_credentials_from_store(b'http', b'example.org', fnames=[self.fname]), None)