|
2 | 2 | import argcomplete |
3 | 3 | import unittest |
4 | 4 | import unittest.mock as mock |
| 5 | +from unittest.mock import patch |
5 | 6 | import shutil |
6 | 7 | import os |
7 | 8 | import importlib.util |
@@ -457,7 +458,8 @@ def test_61_change_org_metadata(self): |
457 | 458 | result = execute(["organization", "print-metadata", self.org_id], self.parser, self.conf) |
458 | 459 | assert self.new_description in result |
459 | 460 |
|
460 | | - def test_62_change_service_metadata(self): |
| 461 | + @patch("builtins.input", side_effect=["1", "2"]) |
| 462 | + def test_62_change_service_metadata(self, mock_input): |
461 | 463 | execute(["service", "metadata-remove-group", self.group_name], self.parser, self.conf) |
462 | 464 | execute(["service", "metadata-add-group", self.group_name], self.parser, self.conf) |
463 | 465 | execute(["organization", "update-group", self.group_name], self.parser, self.conf) |
@@ -497,7 +499,7 @@ def test_63_tags(self): |
497 | 499 | print(execute(["service", "print-tags", self.org_id, self.service_id], self.parser, self.conf)) |
498 | 500 | result=execute(["service", "print-tags", self.org_id, self.service_id], self.parser, self.conf) |
499 | 501 | print(result) |
500 | | - assert self.tags in result |
| 502 | + assert self.tags[0] in result |
501 | 503 |
|
502 | 504 | def test_64_get_api_metadata(self): |
503 | 505 | os.remove(f"./ExampleService.proto") |
|
0 commit comments