def test_get_vendor_2(self): """Test #2: Test that vendors are returned correctly when they are present (byte strings).""" self.assertEqual(linux.get_vendor(node=self.bytenode1), "FakeVendor") self.assertEqual(linux.get_vendor(node=self.bytenode2), "FakeVendor2")
def test_get_vendor_3(self): """Test #3: Test that vendors are returned correctly when they have non-roman chars (unicode strings).""" self.assertEqual(linux.get_vendor(node=self.node3), "ΉΜήυΟομἝἲϾᾍᾈᾁὮᾌ") self.assertEqual(linux.get_vendor(node=self.node4), "ꀒꀲꀯꀭꁎꀦꀄꀴꀿꀬꀝꅮꅧꅌ")
def test_get_vendor_5(self): """Test #5: Test that u"Unknown" is returned when vendor string is missing.""" self.assertEqual(linux.get_vendor(node=self.badnode1), "Unknown")