def test_saved_password(self):
     self.write_file(self.rc, PYPIRC_NOPASSWORD)
     dist = Distribution()
     cmd = upload(dist)
     cmd.finalize_options()
     self.assertEqual(cmd.password, None)
     dist.password = '******'
     cmd = upload(dist)
     cmd.finalize_options()
     self.assertEqual(cmd.password, 'xxx')
 def test_saved_password(self):
     self.write_file(self.rc, PYPIRC_NOPASSWORD)
     dist = Distribution()
     cmd = upload(dist)
     cmd.finalize_options()
     self.assertEqual(cmd.password, None)
     dist.password = '******'
     cmd = upload(dist)
     cmd.finalize_options()
     self.assertEqual(cmd.password, 'xxx')
     return
Exemple #3
0
    def test_saved_password(self):
        # file with no password
        self.write_file(self.rc, PYPIRC_NOPASSWORD)

        # make sure it passes
        dist = Distribution()
        cmd = upload(dist)
        cmd.finalize_options()
        self.assertEqual(cmd.password, None)

        # make sure we get it as well, if another command
        # initialized it at the dist level
        dist.password = '******'
        cmd = upload(dist)
        cmd.finalize_options()
        self.assertEqual(cmd.password, 'xxx')
Exemple #4
0
    def test_saved_password(self):
        # file with no password
        self.write_file(self.rc, PYPIRC_NOPASSWORD)

        # make sure it passes
        dist = Distribution()
        cmd = upload(dist)
        cmd.finalize_options()
        self.assertEqual(cmd.password, None)

        # make sure we get it as well, if another command
        # initialized it at the dist level
        dist.password = '******'
        cmd = upload(dist)
        cmd.finalize_options()
        self.assertEqual(cmd.password, 'xxx')