コード例 #1
0
ファイル: test_rezume.py プロジェクト: hkmshb/rezume
 def test_adding_item_to_wrong_section_fails(self):
     rezume = Rezume()
     with pytest.raises(RezumeError):
         item = Education(institution="edX",
                          area="humanity",
                          start_date="2020-07-05")
         rezume.add_item("work", item)
コード例 #2
0
ファイル: test_rezume.py プロジェクト: hkmshb/rezume
    def test_can_add_item_to_known_section(self):
        try:
            rezume = Rezume()
            section_name = "education"
            assert len(rezume[section_name]) == 0

            item = Education(institution="edX",
                             area="humanity",
                             startDate="2020-07-05")
            rezume.add_item(section_name, item)
            assert len(rezume[section_name]) == 1
        except Exception:
            pytest.fail("Exception not expected")
コード例 #3
0
ファイル: test_rezume.py プロジェクト: hkmshb/rezume
 def test_adding_item_to_unknown_section_fails(self):
     rezume = Rezume()
     with pytest.raises(RezumeError):
         rezume.add_item("-work-", Experience.construct())