MCPcopy Index your code
hub / github.com/python/cpython / _test_token_x

Method _test_token_x

Lib/test/test_netrc.py:96–103  ·  view source on GitHub ↗
(self, nrc, token, value)

Source from the content-addressed store, hash-verified

94 self.assertRaises(netrc.NetrcParseError, self.make_nrc, item)
95
96 def _test_token_x(self, nrc, token, value):
97 nrc = self.make_nrc(nrc)
98 if token == 'login':
99 self.assertEqual(nrc.hosts['host.domain.com'], (value, 'acct', 'pass'))
100 elif token == 'account':
101 self.assertEqual(nrc.hosts['host.domain.com'], ('log', value, 'pass'))
102 elif token == 'password':
103 self.assertEqual(nrc.hosts['host.domain.com'], ('log', 'acct', value))
104
105 def test_token_value_quotes(self):
106 self._test_token_x("""\

Calls 2

make_nrcMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected