def test_min_years_since_death_pma_100(self):
     re_page = self._create_mock_page(text="{{REDaten|BAND=II,2}}\ntext\n{{REAutor|Sauer.}}", title="RE:Bla")
     factory = P6216CopyrightStatus(re_page, self.logger)
     claim_100 = factory.min_years_since_death
     compare(COUNTRIES_WITH_100_YEARS_PMA_OR_SHORTER,
             claim_100["qualifiers"]["P1001"][0]["datavalue"]["value"]["numeric-id"])
     compare(HUNDRED_YEARS_OR_MORE_AFTER_AUTHORS_DEATH,
             claim_100["qualifiers"]["P459"][0]["datavalue"]["value"]["numeric-id"])
 def test_min_years_since_death_multiple_authors(self):
     re_page = self._create_mock_page(text="{{REDaten|BAND=II,2}}\ntext\n{{REAutor|Sauer.}}\n"
                                           "{{REAbschnitt}}\ntext\n{{REAutor|Boethius}}\n"
                                           "{{REAbschnitt}}\ntext\n{{REAutor|OFF}}\n"
                                           "{{REAbschnitt}}\ntext\n{{REAutor|Eger.}}",
                                      title="RE:Bla")
     factory = P6216CopyrightStatus(re_page, self.logger)
     claim_boethius = factory.min_years_since_death
     compare(COUNTRIES_WITH_50_YEARS_PMA_OR_SHORTER,
             claim_boethius["qualifiers"]["P1001"][0]["datavalue"]["value"]["numeric-id"])
     compare(FIFTY_YEARS_OR_MORE_AFTER_AUTHORS_DEATH,
             claim_boethius["qualifiers"]["P459"][0]["datavalue"]["value"]["numeric-id"])
 def test_xx_years_after_authors_death(self):
     re_page = self._create_mock_page(text="{{REDaten|BAND=II,2}}\ntext\n{{REAutor|Escher.}}", title="RE:Atreus")
     factory = P6216CopyrightStatus(re_page, self.logger)
     claim_50 = factory.xx_years_after_authors_death(50)
     compare(self.PMA_CLAIM_50, claim_50)
 def test_threshold_of_originality_cross_reference(self):
     re_page = self._create_mock_page(text="{{REDaten|BAND=X A|VERWEIS=ON}}\ntext\n{{REAutor|Blablub}}",
                                      title="RE:Bla")
     factory = P6216CopyrightStatus(re_page, self.logger)
     compare(self.THRESHOLD_CLAIM, factory._get_claim_json()[0])
 def test_threshold_of_originality(self):
     re_page = self._create_mock_page(text="{{REDaten|KEINE_SCHÖPFUNGSHÖHE=ON}}\ntext\n{{REAutor|Blablub}}",
                                      title="RE:Bla")
     factory = P6216CopyrightStatus(re_page, self.logger)
     compare(self.THRESHOLD_CLAIM, factory.threshold_of_originality)
 def test_no_at_all(self):
     re_page = self._create_mock_page(text="{{REDaten|BAND=X A}}\ntext\n{{REAutor|Blablub}}",
                                      title="RE:Bla")
     factory = P6216CopyrightStatus(re_page, self.logger)
     compare([], factory._get_claim_json())
 def test_published_95_years_ago_yes(self):
     re_page = self._create_mock_page(text="{{REDaten|BAND=II,2}}\ntext\n{{REAutor|Blablub}}",
                                      title="RE:Bla")
     factory = P6216CopyrightStatus(re_page, self.logger)
     compare(self.PUBLISHED_CLAIM, factory._get_claim_json()[0])
 def test_only_pma_claim(self):
     re_page = self._create_mock_page(text="{{REDaten|BAND=X A}}\ntext\n{{REAutor|Boethius}}", title="RE:Bla")
     factory = P6216CopyrightStatus(re_page, self.logger)
     compare(self.PMA_CLAIM_50, factory._get_claim_json()[0])
 def test_min_years_since_death_author_not_known(self):
     re_page = self._create_mock_page(text="{{REDaten|BAND=II,2}}\ntext\n{{REAutor|Blablub}}",
                                      title="RE:Bla")
     factory = P6216CopyrightStatus(re_page, self.logger)
     claim_boethius = factory.min_years_since_death
     compare(None, claim_boethius)