~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ssh_transport.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2007-2010 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
132
132
        # Last cached value always checked first
133
133
        self.assertIs(manager.get_vendor({}), vendor)
134
134
 
 
135
    def test_get_vendor_from_path_win32_plink(self):
 
136
        manager = TestSSHVendorManager()
 
137
        manager.set_ssh_version_string("plink: Release 0.60")
 
138
        plink_path = "C:/Program Files/PuTTY/plink.exe"
 
139
        vendor = manager.get_vendor({"BZR_SSH": plink_path})
 
140
        self.assertIsInstance(vendor, PLinkSubprocessVendor)
 
141
        args = vendor._get_vendor_specific_argv("user", "host", 22, ["bzr"])
 
142
        self.assertEqual(args[0], plink_path)
 
143
 
 
144
    def test_get_vendor_from_path_nix_openssh(self):
 
145
        manager = TestSSHVendorManager()
 
146
        manager.set_ssh_version_string(
 
147
            "OpenSSH_5.1p1 Debian-5, OpenSSL, 0.9.8g 19 Oct 2007")
 
148
        openssh_path = "/usr/bin/ssh"
 
149
        vendor = manager.get_vendor({"BZR_SSH": openssh_path})
 
150
        self.assertIsInstance(vendor, OpenSSHSubprocessVendor)
 
151
        args = vendor._get_vendor_specific_argv("user", "host", 22, ["bzr"])
 
152
        self.assertEqual(args[0], openssh_path)
 
153
 
135
154
 
136
155
class SubprocessVendorsTests(TestCase):
137
156