Пример #1
0
 def test_not_a_tag_id(self):
     self.env_assist.assert_raise_library_error(
         lambda: cmd_tag.config(self.env_assist.get_env(), ["id1"]))
     self.env_assist.assert_reports([
         fixture.report_unexpected_element(
             "id1",
             "primitive",
             expected_types=["tag"],
         ),
     ])
Пример #2
0
 def test_tag_id_does_not_exist(self):
     self.env_assist.assert_raise_library_error(lambda: cmd_tag.config(
         self.env_assist.get_env(),
         [
             "nonexistent_tag1",
             "tag2",
             "nonexistent_tag2",
         ],
     ))
     self.env_assist.assert_reports([
         fixture.report_not_found(_id,
                                  expected_types=["tag"],
                                  context_type="tags")
         for _id in ["nonexistent_tag1", "nonexistent_tag2"]
     ])
Пример #3
0
 def test_success_no_args(self):
     self.assertEqual(
         cmd_tag.config(self.env_assist.get_env(), []),
         self.tag_dicts_list,
     )