예제 #1
0
    def test_is_too_old_false(self, date_older_than):
        """Check record is not too old to harvest."""
        from inspirehep.modules.workflows.tasks.matching import is_too_old

        record = Record({'earliest_date': '1993-02-02'})

        result = is_too_old(record)

        self.assertIsNone(result)
예제 #2
0
    def test_is_too_old_preprint_date_true(self, date_older_than):
        """Check record is too old to harvest (preprint_date)."""
        from inspirehep.modules.workflows.tasks.matching import is_too_old

        record = Record({'preprint_date': '1993-02-02'})

        result = is_too_old(record)

        self.assertTrue(result)