def test_keygen_with_mismatching_year(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0, mock_date(2010)), title='Dogville #2 (2014)', tokenizer=mock_tokens_function( ['dogville'])) self.assertEqual(12, scorer.score())
def test_keygen_generic_comments(self): scorer = IssueScorer(metadata=mock_metadata(series='Dogville', series_index=2.0, comments='the barkening continues'), title='Dogville #2', tokenizer=mock_tokens_function( ['dogville'])) self.assertEqual(0, scorer.score())
def test_keygen_comments_indicating_collection(self): scorer = IssueScorer(metadata=mock_metadata( series='Dogville', series_index=2.0, comments='this collects issues #1-10'), title='Dogville #2', tokenizer=mock_tokens_function(['dogville'])) self.assertEqual(20, scorer.score())
def test_keygen_comments_indicating_translated_collection(self): scorer = IssueScorer(metadata=mock_metadata(series='Dogville', series_index=2.0, comments='Translates #1-10'), title='Dogville #2', tokenizer=mock_tokens_function( ['dogville'])) self.assertEqual(15, scorer.score())
def test_keygen_generic_comments(self): scorer = IssueScorer(metadata=mock_metadata( series='Dogville', series_index=2.0, comments='the barkening continues'), title='Dogville #2', tokenizer=mock_tokens_function(['dogville'])) self.assertEqual(0, scorer.score())
def test_keygen_issue_number_does_not_match_series_index(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0), title='Dogville #5', tokenizer=mock_tokens_function( ['dogville'])) self.assertEqual(50, scorer.score())
def test_keygen_with_extra_tokens(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0), title='Dogville Awakening #2', tokenizer=mock_tokens_function( ['dogville', 'awakening'])) self.assertEqual(21, scorer.score())
def test_keygen_with_missing_publish_date(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0, None), title='Dogville #2 (2014)', tokenizer=mock_tokens_function( ['dogville'])) self.assertEqual(10, scorer.score())
def test_keygen_float_index_mismatch_int_title(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.1), title='Dogville #2', tokenizer=mock_tokens_function(['dogville'])) self.assertEqual(50, scorer.score())
def test_keygen_float_index_mismatch_int_title(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.1), title='Dogville #2', tokenizer=mock_tokens_function( ['dogville'])) self.assertEqual(50, scorer.score())
def test_keygen_float_series_index(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.1), title='Dogville #2.1', tokenizer=mock_tokens_function( ['dogville'])) self.assertEqual(0, scorer.score())
def test_keygen_with_missing_publish_date(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0, None), title='Dogville #2 (2014)', tokenizer=mock_tokens_function(['dogville'])) self.assertEqual(10, scorer.score())
def test_keygen_float_series_index(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.1), title='Dogville #2.1', tokenizer=mock_tokens_function(['dogville'])) self.assertEqual(0, scorer.score())
def test_keygen_no_title(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0), title=None, tokenizer=mock_tokens_function([])) self.assertEqual(0, scorer.score())
def test_keygen_series_index_not_in_title(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0), title='Dogville', tokenizer=mock_tokens_function(['dogville'])) self.assertEqual(10, scorer.score())
def test_keygen_issue_number_does_not_match_series_index(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0), title='Dogville #5', tokenizer=mock_tokens_function(['dogville'])) self.assertEqual(50, scorer.score())
def test_keygen_series_index_not_in_title(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0), title='Dogville', tokenizer=mock_tokens_function( ['dogville'])) self.assertEqual(10, scorer.score())
def test_keygen_with_mismatching_year(self): scorer = IssueScorer(metadata=mock_metadata('Dogville', 2.0, mock_date(2010)), title='Dogville #2 (2014)', tokenizer=mock_tokens_function(['dogville'])) self.assertEqual(12, scorer.score())