core/storage/suggestion/gae_models_test.py

Summary

Maintainability
F
2 wks
Test Coverage

File gae_models_test.py has 5754 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# coding: utf-8
#
# Copyright 2018 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Severity: Major
Found in core/storage/suggestion/gae_models_test.py - About 2 wks to fix

    SuggestionModelUnitTests has 59 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class SuggestionModelUnitTests(test_utils.GenericTestBase):
        """Tests for the suggestionModel class."""
    
        score_category: str = (
            suggestion_models.SCORE_TYPE_TRANSLATION +
    Severity: Major
    Found in core/storage/suggestion/gae_models_test.py - About 1 day to fix

      Function test_fetch_page_with_sorting has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      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=[
      Severity: Major
      Found in core/storage/suggestion/gae_models_test.py - About 2 hrs to fix

        Function test_fetch_page_with_sorting has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        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,
        Severity: Major
        Found in core/storage/suggestion/gae_models_test.py - About 2 hrs to fix

          Function test_get_in_review_question_suggestions_by_offset has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          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'
          Severity: Minor
          Found in core/storage/suggestion/gae_models_test.py - About 1 hr to fix

            Function test_fetch_page_with_filtering has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            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,
            Severity: Minor
            Found in core/storage/suggestion/gae_models_test.py - About 1 hr to fix

              Function test_fetch_page_with_filtering has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              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,
              Severity: Minor
              Found in core/storage/suggestion/gae_models_test.py - About 1 hr to fix

                Function test_get_in_review_translation_suggestions_by_offset_sorted has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                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'
                Severity: Minor
                Found in core/storage/suggestion/gae_models_test.py - About 1 hr to fix

                  Function test_get_translation_suggestions_in_review_with_exp_ids_by_offset_sorted has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  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'
                  Severity: Minor
                  Found in core/storage/suggestion/gae_models_test.py - About 1 hr to fix

                    Function test_fetch_page_with_sorting has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    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,
                    Severity: Minor
                    Found in core/storage/suggestion/gae_models_test.py - About 1 hr to fix

                      Function test_fetch_page_with_sorting has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      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=[
                      Severity: Minor
                      Found in core/storage/suggestion/gae_models_test.py - About 1 hr to fix

                        Function test_fetch_page_with_filtering has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        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=[
                        Severity: Minor
                        Found in core/storage/suggestion/gae_models_test.py - About 1 hr to fix

                          There are no issues that match your filters.

                          Category
                          Status