~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/netrc_credential_store/tests/test_netrc.py

  • Committer: Vincent Ladeuil
  • Date: 2016-02-01 18:09:18 UTC
  • mfrom: (6614.1.3 assert)
  • mto: This revision was merged to the branch mainline in revision 6615.
  • Revision ID: v.ladeuil+lp@free.fr-20160201180918-jqtq8ol6gdbbbtpv
Fix deprecated assertions to unblock release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2013, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
61
61
    def test_matching_user(self):
62
62
        cs = self._get_netrc_cs()
63
63
        password = cs.decode_password(dict(host='host', user='joe'))
64
 
        self.assertEquals('secret', password)
 
64
        self.assertEqual('secret', password)
65
65
 
66
66
    def test_default_password(self):
67
67
        cs = self._get_netrc_cs()
68
68
        password = cs.decode_password(dict(host='other', user='anonymous'))
69
 
        self.assertEquals('joe@home', password)
 
69
        self.assertEqual('joe@home', password)
70
70
 
71
71
    def test_default_password_without_user(self):
72
72
        cs = self._get_netrc_cs()
84
84
        conf = config.AuthenticationConfig(_file=StringIO(ac_content))
85
85
        credentials = conf.get_credentials('scheme', 'host', user='joe')
86
86
        self.assertIsNot(None, credentials)
87
 
        self.assertEquals('secret', credentials.get('password', None))
 
87
        self.assertEqual('secret', credentials.get('password', None))