Ejemplo n.º 1
0
 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'))
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 def test_nonmatching_hostname(self):
     self.assertEqual(
         get_credentials_from_store(b'https',
                                    b'noentry.org',
                                    fnames=[self.fname]), None)
Ejemplo n.º 4
0
 def test_nonmatching_scheme(self):
     self.assertEqual(
         get_credentials_from_store(b'http',
                                    b'example.org',
                                    fnames=[self.fname]), None)