18 lines
533 B
Python
18 lines
533 B
Python
import unittest
|
|
from pathlib import Path
|
|
|
|
from archive_clients import PROTO_COMMIT
|
|
|
|
|
|
class GeneratedContractTests(unittest.TestCase):
|
|
def test_all_generated_files_record_proto_commit(self):
|
|
files = list(Path("src/archive_control/v1").glob("*_pb2.py"))
|
|
files += list(Path("src/archive_control/v1").glob("*_pb2.pyi"))
|
|
self.assertEqual(len(files), 18)
|
|
for path in files:
|
|
self.assertIn(PROTO_COMMIT, path.read_text(encoding="utf-8")[:256])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|