예제 #1
0
파일: test_packet.py 프로젝트: jetty840/s3g
 def test_packet_crc(self):
   payload = 'abcd'
   packet = Encoder.encode_payload(payload)
   assert packet[6] == Encoder.CalculateCRC(payload);
예제 #2
0
파일: test_packet.py 프로젝트: jetty840/s3g
  def test_packet_header(self):
    payload = 'abcd'
    packet = Encoder.encode_payload(payload)

    assert packet[0] == constants.header
예제 #3
0
파일: test_packet.py 프로젝트: jetty840/s3g
 def test_packet_length_field(self):
   payload = 'abcd'
   packet = Encoder.encode_payload(payload)
   assert packet[1] == len(payload)
예제 #4
0
파일: test_packet.py 프로젝트: jetty840/s3g
 def test_packet_length(self):
   payload = 'abcd'
   packet = Encoder.encode_payload(payload)
   assert len(packet) == len(payload) + 3