Exemplo n.º 1
0
class TestFileTagDictionaryEncoding(unittest.TestCase):
    def setUp(self):
        self._encoder = FileTagDictionaryEncoder()

    def test_encoded(self):
        data = FileTag(year=2015,
                       sequence_n=123,
                       sender='SND',
                       receiver='RCV',
                       version=2.1)

        encoded = self._encoder.encode(data)

        self.assertEqual(2015, encoded['year'])
        self.assertEqual(123, encoded['sequence_n'])
        self.assertEqual('SND', encoded['sender'])
        self.assertEqual('RCV', encoded['receiver'])
        self.assertEqual(2.1, encoded['version'])
Exemplo n.º 2
0
class TestFileTagDictionaryEncoding(unittest.TestCase):
    def setUp(self):
        self._encoder = FileTagDictionaryEncoder()

    def test_encoded(self):
        data = FileTag(year=2015,
                       sequence_n=123,
                       sender='SND',
                       receiver='RCV',
                       version=2.1)

        encoded = self._encoder.encode(data)

        self.assertEqual(2015, encoded['year'])
        self.assertEqual(123, encoded['sequence_n'])
        self.assertEqual('SND', encoded['sender'])
        self.assertEqual('RCV', encoded['receiver'])
        self.assertEqual(2.1, encoded['version'])
Exemplo n.º 3
0
 def setUp(self):
     self._encoder = FileTagDictionaryEncoder()
Exemplo n.º 4
0
 def setUp(self):
     self._encoder = FileTagDictionaryEncoder()