def test_no_additions(self):
        self._changes_codec._encode_changes(ChangesCodec.RepositoryChanges(),
                                            _TEMP_PATH_1)

        encoded_changes: TextIO = open(_TEMP_PATH_1, 'r')

        self.assertEqual(encoded_changes.read(), '')
    def test_some_additions(self):
        repo_changes: ChangesCodec.RepositoryChanges = (
            ChangesCodec.RepositoryChanges())

        repo_changes.addition = ['123', '321']

        self._changes_codec._encode_changes(repo_changes, _TEMP_PATH_1)

        encoded_changes: TextIO = open(_TEMP_PATH_1, 'r')

        self.assertEqual(encoded_changes.readline(), 'addition:\n')
        self.assertEqual(encoded_changes.readline(), '123\n')
        self.assertEqual(encoded_changes.readline(), '321\n')
        self.assertEqual(encoded_changes.readline(), '')