Ejemplo n.º 1
0
    def test_main(self):
        with MockSCSI(MockReadCapacity10(sbc)) as s:
            i = s.readcapacity10().result
            self.assertEqual(i['returned_lba'], 65536)
            self.assertEqual(i['block_length'], 4096)

            d = ReadCapacity10.unmarshall_datain(ReadCapacity10.marshall_datain(i))
            self.assertEqual(d, i)
Ejemplo n.º 2
0
def main():
    with MockSCSI(MockReadCapacity10(sbc)) as s:
        i = s.readcapacity10().result
        assert i['returned_lba'] == 65536
        assert i['block_length'] == 4096

        d = ReadCapacity10.unmarshall_datain(ReadCapacity10.marshall_datain(i))
        assert d == i
def main():
    with MockSCSI(MockReadCapacity10(sbc)) as s:
        i = s.readcapacity10().result
        assert i['returned_lba'] == 65536
        assert i['block_length'] == 4096

        d = ReadCapacity10.unmarshall_datain(ReadCapacity10.marshall_datain(i))
        assert d == i
def main():
    dev = MockReadCapacity10()
    dev.opcodes = sbc
    s = SCSI(dev)

    i = s.readcapacity10().result
    assert i["returned_lba"] == 65536
    assert i["block_length"] == 4096

    d = ReadCapacity10.unmarshall_datain(ReadCapacity10.marshall_datain(i))
    assert d == i
def main():
    dev = MockReadCapacity10()
    dev.opcodes = sbc
    s = SCSI(dev)

    i = s.readcapacity10().result
    assert i['returned_lba'] == 65536
    assert i['block_length'] == 4096

    d = ReadCapacity10.unmarshall_datain(ReadCapacity10.marshall_datain(i))
    assert d == i