35 lines
857 B
Python
35 lines
857 B
Python
import sys
|
|
import unittest
|
|
from unittest.mock import patch
|
|
|
|
import run_migration
|
|
|
|
|
|
class RunMigrationCliTests(unittest.TestCase):
|
|
def test_model_defaults_to_glm(self) -> None:
|
|
argv = [
|
|
"run_migration.py",
|
|
"--batch-id",
|
|
"b1",
|
|
"--file-list",
|
|
"files.txt",
|
|
]
|
|
with patch.object(sys, "argv", argv):
|
|
args = run_migration._parse_args()
|
|
self.assertEqual(args.model, "glm")
|
|
|
|
def test_model_accepts_qwen(self) -> None:
|
|
argv = [
|
|
"run_migration.py",
|
|
"--batch-id",
|
|
"b1",
|
|
"--file-list",
|
|
"files.txt",
|
|
"--model",
|
|
"qwen",
|
|
]
|
|
with patch.object(sys, "argv", argv):
|
|
args = run_migration._parse_args()
|
|
self.assertEqual(args.model, "qwen")
|
|
|