~fcorrea/landscape-client/add-vminfo-to-computer-info-message

« back to all changes in this revision

Viewing changes to landscape/lib/tests/test_virtual.py

  • Committer: Fernando Correa Neto
  • Date: 2011-04-15 20:34:18 UTC
  • Revision ID: fernando.neto@canonical.com-20110415203418-byfy30i3mgsb4ptj
-Make sure it returns unicode instead of plain strings

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        self.mocker.result(True)
49
49
        self.mocker.replay()
50
50
 
51
 
        self.assertEqual('Xen', get_virtualization_type())
 
51
        self.assertEqual(u'Xen', get_virtualization_type())
52
52
        
53
53
    def test_xen_virtualization_when_sys_bus_xen(self):
54
54
        """
59
59
        self.mocker.result(True)
60
60
        self.mocker.replay()
61
61
 
62
 
        self.assertEquals('Xen', get_virtualization_type())
 
62
        self.assertEquals(u'Xen', get_virtualization_type())
63
63
 
64
64
    def test_xen_virtualization_when_proc_xen(self):
65
65
        """
70
70
        self.mocker.result(True)
71
71
        self.mocker.replay()
72
72
 
73
 
        self.assertEquals('Xen', get_virtualization_type())
 
73
        self.assertEquals(u'Xen', get_virtualization_type())
74
74
 
75
75
    def test_kvm_virtualization_when_qemu_present_in_proc_cpuinfo(self):
76
76
        """
82
82
        cpuinfo_path = os.path.join(proc_path, u"cpuinfo")
83
83
        self.makeFile(path=cpuinfo_path, content=self.KVM_CPUINFO)
84
84
 
85
 
        self.assertEqual("KVM", get_virtualization_type(root_path=self.root_path))
 
85
        self.assertEqual(u"KVM", get_virtualization_type(root_path=self.root_path))
86
86