debian-koji/tests/test_hub/test_repo_set_state.py
2022-05-09 14:05:52 +02:00

14 lines
442 B
Python

import unittest
import koji
import kojihub
class TestRepoSetState(unittest.TestCase):
def test_set_state_wrong_type_typeID(self):
repo_id = 'test-repo-id'
with self.assertRaises(koji.ParameterError) as cm:
kojihub.repo_set_state(repo_id, 'failed')
self.assertEqual(f"Invalid type for value '{repo_id}': {type(repo_id)}, "
f"expected type <class 'int'>", str(cm.exception))