예제 #1
0
    def test_serialize_EmptyItemHeader_HexValueIsCorrect(self):
        item_header = ItemHeader(empty=True, size=0xdc39a0)

        serialized = ItemHeaderSerializer.serialize(item_header)

        self.assertEquals(hexstr(serialized), "00" "00dc39a0")
예제 #2
0
    def test_serialize_EmptyItemHeader_HexValueIsCorrect(self):
        item_header = ItemHeader(empty=True, size=0xdc39a0)
        
        serialized = ItemHeaderSerializer.serialize(item_header)

        self.assertEquals(hexstr(serialized), "00" "00dc39a0")
예제 #3
0
    def test_serialize_NotEmptyItemHeader_HexValueIsCorrect(self):
        item_header = ItemHeader(empty=False, size=0xec39a0)

        serialized = ItemHeaderSerializer.serialize(item_header)

        self.assertEquals(hexstr(serialized), "01" "00ec39a0")
예제 #4
0
    def test_serialize_NotEmptyItemHeader_HexValueIsCorrect(self):
        item_header = ItemHeader(empty=False, size=0xec39a0)
        
        serialized = ItemHeaderSerializer.serialize(item_header)

        self.assertEquals(hexstr(serialized), "01" "00ec39a0")