Ejemplo n.º 1
0
class TestGroupTrailerDictionaryEncoding(unittest.TestCase):
    def setUp(self):
        self._encoder = GroupTrailerDictionaryEncoder()

    def test_encoded(self):
        data = GroupTrailer(record_type='GRT',
                            group_id=3,
                            transaction_count=15,
                            record_count=20)

        encoded = self._encoder.encode(data)

        self.assertEqual('GRT', encoded['record_type'])
        self.assertEqual(3, encoded['group_id'])
        self.assertEqual(15, encoded['transaction_count'])
        self.assertEqual(20, encoded['record_count'])
Ejemplo n.º 2
0
class TestGroupTrailerDictionaryEncoding(unittest.TestCase):
    def setUp(self):
        self._encoder = GroupTrailerDictionaryEncoder()

    def test_encoded(self):
        data = GroupTrailer(record_type='GRT',
                            group_id=3,
                            transaction_count=15,
                            record_count=20)

        encoded = self._encoder.encode(data)

        self.assertEqual('GRT', encoded['record_type'])
        self.assertEqual(3, encoded['group_id'])
        self.assertEqual(15, encoded['transaction_count'])
        self.assertEqual(20, encoded['record_count'])
Ejemplo n.º 3
0
 def setUp(self):
     self._encoder = GroupTrailerDictionaryEncoder()
Ejemplo n.º 4
0
 def setUp(self):
     self._encoder = GroupTrailerDictionaryEncoder()
Ejemplo n.º 5
0
 def get_record_dictionary_encoder(self, entity):
     return GroupTrailerDictionaryEncoder()