def test_parse_utmp_fail(self): '''Fail when the bytes are a bad length''' with self.assertRaises(ss.UtmpLengthError): ss._parse_utmp(b'\x00\x01')
def test_parse_utmp(self): '''Make sure utmp is working right''' self.assertDictEqual(ss._parse_utmp(self.utmpbytes)[0], self.utmpdict)