# Path: tests/kiss_mock.py
# class KissMock(apex.kiss.Kiss):
# 
#     def __init__(self,
#                  strip_df_start=True):
#         super(KissMock, self).__init__(strip_df_start)
#         self.read_from_interface = []
#         self.sent_to_interface = []
# 
#     def _read_interface(self):
#         if not len(self.read_from_interface):
#             return None
#         raw_frame = self.read_from_interface[0]
#         del self.read_from_interface[0]
#         return raw_frame
# 
#     def _write_interface(self, data):
#         self.sent_to_interface.append(data)
# 
#     def clear_interface(self):
#         self.read_from_interface = []
#         self.sent_to_interface = []
# 
#     def add_read_from_interface(self, raw_frame):
#         self.read_from_interface.append(raw_frame)
# 
#     def get_sent_to_interface(self):
#         return self.sent_to_interface


import unittest
import apex.kiss
import apex.kiss.constants
from .kiss_mock import KissMock
from __future__ import division
from __future__ import print_function




__author__ = 'Jeffrey Phillips Freeman (WI2ARD)'
__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)'
__email__ = 'jeffrey.freeman@syncleus.com'
__license__ = 'Apache License, Version 2.0'
__copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors'
__credits__ = []

# KG6WTF>S7TSUV,MTOSO-2,WIDE2*,qAR,KF6FIR-10:`17El#X-/kg6wtf@gosselinfamily.com
ENCODED_FRAME = [192, 0, 75, 71, 54, 87, 84, 70, 62, 83, 55, 84, 83, 85, 86, 44, 77, 84, 79, 83, 79, 45, 50, 44, 87, 73,
                 68, 69, 50, 42, 44, 113, 65, 82, 44, 75, 70, 54, 70, 73, 82, 45, 49, 48, 58, 96, 49, 55, 69, 108, 35,
                 88, 45, 47, 107, 103, 54, 119, 116, 102, 64, 103, 111, 115, 115, 101, 108, 105, 110, 102, 97, 109, 105,
                 108, 121, 46, 99, 111, 109, 192]
DECODED_FRAME = [75, 71, 54, 87, 84, 70, 62, 83, 55, 84, 83, 85, 86, 44, 77, 84, 79, 83, 79, 45, 50, 44, 87, 73, 68,
                 69, 50, 42, 44, 113, 65, 82, 44, 75, 70, 54, 70, 73, 82, 45, 49, 48, 58, 96, 49, 55, 69, 108, 35,
                 88, 45, 47, 107, 103, 54, 119, 116, 102, 64, 103, 111, 115, 115, 101, 108, 105, 110, 102, 97, 109,
                 105, 108, 121, 46, 99, 111, 109]

# pylint: disable=R0904,C0103
class KissUtilTestCase(unittest.TestCase):

    """Test class for KISS Python Module."""

    def setUp(self):
        """Setup."""

# Path: tests/kiss_mock.py
# class KissMock(apex.kiss.Kiss):
# 
#     def __init__(self,
#                  strip_df_start=True):
#         super(KissMock, self).__init__(strip_df_start)
#         self.read_from_interface = []
#         self.sent_to_interface = []
# 
#     def _read_interface(self):
#         if not len(self.read_from_interface):
#             return None
#         raw_frame = self.read_from_interface[0]
#         del self.read_from_interface[0]
#         return raw_frame
# 
#     def _write_interface(self, data):
#         self.sent_to_interface.append(data)
# 
#     def clear_interface(self):
#         self.read_from_interface = []
#         self.sent_to_interface = []
# 
#     def add_read_from_interface(self, raw_frame):
#         self.read_from_interface.append(raw_frame)
# 
#     def get_sent_to_interface(self):
#         return self.sent_to_interface


# Path: tests/test_kiss.py
import unittest
import apex.kiss
import apex.kiss.constants
from .kiss_mock import KissMock

from __future__ import division
from __future__ import print_function




__author__ = 'Jeffrey Phillips Freeman (WI2ARD)'
__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)'
__email__ = 'jeffrey.freeman@syncleus.com'
__license__ = 'Apache License, Version 2.0'
__copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors'
__credits__ = []

# KG6WTF>S7TSUV,MTOSO-2,WIDE2*,qAR,KF6FIR-10:`17El#X-/kg6wtf@gosselinfamily.com
ENCODED_FRAME = [192, 0, 75, 71, 54, 87, 84, 70, 62, 83, 55, 84, 83, 85, 86, 44, 77, 84, 79, 83, 79, 45, 50, 44, 87, 73,
                 68, 69, 50, 42, 44, 113, 65, 82, 44, 75, 70, 54, 70, 73, 82, 45, 49, 48, 58, 96, 49, 55, 69, 108, 35,
                 88, 45, 47, 107, 103, 54, 119, 116, 102, 64, 103, 111, 115, 115, 101, 108, 105, 110, 102, 97, 109, 105,
                 108, 121, 46, 99, 111, 109, 192]
DECODED_FRAME = [75, 71, 54, 87, 84, 70, 62, 83, 55, 84, 83, 85, 86, 44, 77, 84, 79, 83, 79, 45, 50, 44, 87, 73, 68,
                 69, 50, 42, 44, 113, 65, 82, 44, 75, 70, 54, 70, 73, 82, 45, 49, 48, 58, 96, 49, 55, 69, 108, 35,
                 88, 45, 47, 107, 103, 54, 119, 116, 102, 64, 103, 111, 115, 115, 101, 108, 105, 110, 102, 97, 109,
                 105, 108, 121, 46, 99, 111, 109]

# pylint: disable=R0904,C0103
class KissUtilTestCase(unittest.TestCase):

    """Test class for KISS Python Module."""

    def setUp(self):
        """Setup."""

        self.kiss_mock = KissMock()