core/storage/suggestion/gae_models_test.py
File gae_models_test.py
has 5754 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# coding: utf-8
#
# Copyright 2018 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
SuggestionModelUnitTests
has 59 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class SuggestionModelUnitTests(test_utils.GenericTestBase):
"""Tests for the suggestionModel class."""
score_category: str = (
suggestion_models.SCORE_TYPE_TRANSLATION +
Function test_fetch_page_with_sorting
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_fetch_page_with_sorting(self) -> None:
suggestion_models.QuestionSubmitterTotalContributionStatsModel(
id='model_1',
contributor_id=self.USER_ID_1,
topic_ids_with_question_submissions=[
Function test_fetch_page_with_sorting
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_fetch_page_with_sorting(self) -> None:
suggestion_models.TranslationSubmitterTotalContributionStatsModel(
id='model_1',
language_code=self.SUGGESTION_LANGUAGE_CODE,
contributor_id=self.USER_ID_1,
Function test_get_in_review_question_suggestions_by_offset
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_get_in_review_question_suggestions_by_offset(self) -> None:
suggestion_1_id = 'skill1.thread1'
suggestion_2_id = 'skill1.thread2'
suggestion_3_id = 'skill2.thread3'
user_id = 'author1'
Function test_fetch_page_with_filtering
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_fetch_page_with_filtering(self) -> None:
suggestion_models.TranslationSubmitterTotalContributionStatsModel(
id='model_1',
language_code=self.SUGGESTION_LANGUAGE_CODE,
contributor_id=self.USER_ID_1,
Function test_fetch_page_with_filtering
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_fetch_page_with_filtering(self) -> None:
suggestion_models.TranslationReviewerTotalContributionStatsModel(
id='model_1',
language_code=self.LANGUAGE_CODE,
contributor_id=self.USER_ID_1,
Function test_get_in_review_translation_suggestions_by_offset_sorted
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_get_in_review_translation_suggestions_by_offset_sorted(
self
) -> None:
suggestion_1_id = 'exploration.exp1.thread_6'
suggestion_2_id = 'exploration.exp1.thread_7'
Function test_get_translation_suggestions_in_review_with_exp_ids_by_offset_sorted
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_get_translation_suggestions_in_review_with_exp_ids_by_offset_sorted( # pylint: disable=line-too-long
self
) -> None:
suggestion_1_id = 'exploration.exp1.thread_6'
suggestion_2_id = 'exploration.exp1.thread_7'
Function test_fetch_page_with_sorting
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_fetch_page_with_sorting(self) -> None:
suggestion_models.TranslationReviewerTotalContributionStatsModel(
id='model_1',
language_code=self.LANGUAGE_CODE,
contributor_id=self.USER_ID_1,
Function test_fetch_page_with_sorting
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_fetch_page_with_sorting(self) -> None:
suggestion_models.QuestionReviewerTotalContributionStatsModel(
id='model_1',
contributor_id=self.USER_ID_1,
topic_ids_with_question_reviews=[
Function test_fetch_page_with_filtering
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def test_fetch_page_with_filtering(self) -> None:
suggestion_models.QuestionSubmitterTotalContributionStatsModel(
id='model_1',
contributor_id=self.USER_ID_1,
topic_ids_with_question_submissions=[