コード例 #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'])
コード例 #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'])
コード例 #3
0
 def setUp(self):
     self._encoder = GroupTrailerDictionaryEncoder()
コード例 #4
0
 def setUp(self):
     self._encoder = GroupTrailerDictionaryEncoder()
コード例 #5
0
ファイル: record.py プロジェクト: m-mahan/CWR-DataApi
 def get_record_dictionary_encoder(self, entity):
     return GroupTrailerDictionaryEncoder()