Example #1
0
class TestGroupHeaderDictionaryEncoding(unittest.TestCase):
    def setUp(self):
        self._encoder = GroupHeaderDictionaryEncoder()

    def test_encoded(self):
        data = GroupHeader(record_type='GRH',
                           group_id=3,
                           transaction_type='AGR',
                           version_number='02.10',
                           batch_request_id=15)

        encoded = self._encoder.encode(data)

        self.assertEqual('GRH', encoded['record_type'])
        self.assertEqual(3, encoded['group_id'])
        self.assertEqual('AGR', encoded['transaction_type'])
        self.assertEqual('02.10', encoded['version_number'])
        self.assertEqual(15, encoded['batch_request_id'])
Example #2
0
 def setUp(self):
     self._encoder = GroupHeaderDictionaryEncoder()
Example #3
0
 def get_record_dictionary_encoder(self, entity):
     return GroupHeaderDictionaryEncoder()