gecos-team/gecoscc-ui

View on GitHub
gecoscc/tests.py

Summary

Maintainability
F
3 mos
Test Coverage

File tests.py has 5325 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#
# Copyright 2013, Junta de Andalucia
# http://www.juntadeandalucia.es/
#
# Authors:
Severity: Major
Found in gecoscc/tests.py - About 2 wks to fix

    BaseGecosTestCase has 50 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class BaseGecosTestCase(unittest.TestCase):
    
        def setUp(self):
            '''
            1. Parser test.ini
    Severity: Minor
    Found in gecoscc/tests.py - About 7 hrs to fix

      BasicTests has 34 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class BasicTests(BaseGecosTestCase):
      
          def test_01_home(self):
              '''
              Test 1: Check the home works
      Severity: Minor
      Found in gecoscc/tests.py - About 4 hrs to fix

        AdvancedTests has 32 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class AdvancedTests(BaseGecosTestCase):
        
            @mock.patch('gecoscc.forms.create_chef_admin_user')
            @mock.patch('gecoscc.forms._')
            @mock.patch('gecoscc.utils.isinstance')
        Severity: Minor
        Found in gecoscc/tests.py - About 4 hrs to fix

          Function test_03_admins has 96 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def test_03_admins(self, adminuservariablesmodel,
                                 permissionsmodel, adminusermodel, gettext,
                                 gettext_forms, gettext_models, gettext_i18n,
                                 get_chef_api_method, get_chef_api_models_method):
                  '''
          Severity: Major
          Found in gecoscc/tests.py - About 3 hrs to fix

            Function test_02_updates has 83 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def test_02_updates(self, update_model, gettext, gettext_forms, gettext_models,
                                    gettext_i18n, get_chef_api_method,
                                    get_chef_api_models_method):
                    '''
                    Test 2: Check that the updates view works
            Severity: Major
            Found in gecoscc/tests.py - About 3 hrs to fix

              Function test_31_help_channel has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def test_31_help_channel(self, get_chef_api_method,
                      get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                      ChefNodeClass, isinstance_method, gettext,
                      create_chef_admin_user_method, TaskNodeClass, TaskClientClass,
                      gettext_computers):
              Severity: Major
              Found in gecoscc/tests.py - About 2 hrs to fix

                Function __getitem__ has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __getitem__(self, item):
                        if isinstance(item, int):
                            # Get item by number
                            n = 0
                            for elm in self.data.split('\n'):
                Severity: Minor
                Found in gecoscc/tests.py - About 2 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function test_17_node_search has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def test_17_node_search(self):
                        '''
                        Test 17: Node search
                        '''
                        if DISABLE_TESTS: return
                Severity: Major
                Found in gecoscc/tests.py - About 2 hrs to fix

                  Function test_08_complete_policy has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def test_08_complete_policy(self, get_chef_api_method, get_cookbook_method,
                          get_cookbook_method_tasks, NodeClass, ChefNodeClass, isinstance_method,
                          gettext, create_chef_admin_user_method):
                          '''
                          Test 08:
                  Severity: Minor
                  Found in gecoscc/tests.py - About 1 hr to fix

                    Function test_04_priority_user_workstation has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def test_04_priority_user_workstation(self, get_chef_api_method,
                            get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                            ChefNodeClass, isinstance_method, gettext,
                            create_chef_admin_user_method):
                            '''
                    Severity: Minor
                    Found in gecoscc/tests.py - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function test_01_settings has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def test_01_settings(self, gettext):
                            '''
                            Test 1: Check that the settings view works
                            '''
                            if DISABLE_TESTS: return
                    Severity: Minor
                    Found in gecoscc/tests.py - About 1 hr to fix

                      Function test_04_maintenance_mode has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def test_04_maintenance_mode(self, maintenancemodel,
                                               gettext, gettext_forms, gettext_models,
                                              gettext_i18n, get_chef_api_method,
                                              get_chef_api_models_method):
                              '''
                      Severity: Minor
                      Found in gecoscc/tests.py - About 1 hr to fix

                        Function test_12_upload_logs has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            def test_12_upload_logs(self, get_chef_api_method,
                                get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                ChefNodeClass, isinstance_method, gettext,
                                create_chef_admin_user_method):
                                '''
                        Severity: Minor
                        Found in gecoscc/tests.py - About 1 hr to fix

                          Function test_02_shared_folder_movements has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def test_02_shared_folder_movements(self, get_chef_api_method, 
                                  get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                  ChefNodeClass, isinstance_method, gettext,
                                  create_chef_admin_user_method):
                                  '''
                          Severity: Minor
                          Found in gecoscc/tests.py - About 1 hr to fix

                            Function apply_mocks has 12 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def apply_mocks(self, get_chef_api_method=None, get_cookbook_method=None,
                            Severity: Major
                            Found in gecoscc/tests.py - About 1 hr to fix

                              Function test_34_login_view has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def test_34_login_view(self, get_chef_api_method,
                                      get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                      ChefNodeClass, isinstance_method, gettext, portal_gettext,
                                      create_chef_admin_user_method):
                                      '''
                              Severity: Minor
                              Found in gecoscc/tests.py - About 1 hr to fix

                                Function test_16_repository_visibility has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def test_16_repository_visibility(self, get_chef_api_method,
                                        get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                        ChefNodeClass, isinstance_method, gettext,
                                        create_chef_admin_user_method):
                                        '''
                                Severity: Minor
                                Found in gecoscc/tests.py - About 1 hr to fix

                                  Function apply_mocks has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def apply_mocks(self, get_chef_api_method=None, get_cookbook_method=None,
                                          get_cookbook_method_tasks=None, NodeClass=None, ChefNodeClass=None,
                                          isinstance_method=None, gettext=None,
                                          create_chef_admin_user_method=None, ChefNodeStatusClass=None,
                                          TaskNodeClass=None, TaskClientClass=None, ClientClass=None):
                                  Severity: Minor
                                  Found in gecoscc/tests.py - About 1 hr to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function test_01_update_resources_user has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      def test_01_update_resources_user(self, get_chef_api_method,
                                          get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                          ChefNodeClass, isinstance_method, gettext,
                                          create_chef_admin_user_method):
                                          '''
                                  Severity: Minor
                                  Found in gecoscc/tests.py - About 1 hr to fix

                                    Function test_15_shared_folder_visibility has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        def test_15_shared_folder_visibility(self, get_chef_api_method, 
                                            get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                            ChefNodeClass, isinstance_method, gettext,
                                            create_chef_admin_user_method):
                                            '''
                                    Severity: Minor
                                    Found in gecoscc/tests.py - About 1 hr to fix

                                      Function test_31_help_channel has 11 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def test_31_help_channel(self, get_chef_api_method,
                                      Severity: Major
                                      Found in gecoscc/tests.py - About 1 hr to fix

                                        Function test_18_delete_ou_with_user_and_workstation_in_domain has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            def test_18_delete_ou_with_user_and_workstation_in_domain(self,
                                                get_chef_api_method, get_cookbook_method, get_cookbook_method_tasks,
                                                NodeClass, ChefNodeClass, isinstance_method, gettext,
                                                create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                '''
                                        Severity: Minor
                                        Found in gecoscc/tests.py - About 1 hr to fix

                                          Function test_23_delete_group_in_domain_with_workstation_and_user has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              def test_23_delete_group_in_domain_with_workstation_and_user(self,
                                                  get_chef_api_method, get_cookbook_method, get_cookbook_method_tasks,
                                                  NodeClass, ChefNodeClass, isinstance_method, gettext,
                                                  create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                  '''
                                          Severity: Minor
                                          Found in gecoscc/tests.py - About 1 hr to fix

                                            Function test_22_delete_group_in_domain_with_politic has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                def test_22_delete_group_in_domain_with_politic(self, get_chef_api_method,
                                                    get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                    ChefNodeClass, isinstance_method, gettext,
                                                    create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                    '''
                                            Severity: Minor
                                            Found in gecoscc/tests.py - About 1 hr to fix

                                              Function test_21_delete_group_with_politic has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  def test_21_delete_group_with_politic(self, get_chef_api_method,
                                                      get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                      ChefNodeClass, isinstance_method, gettext,
                                                      create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                      '''
                                              Severity: Minor
                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                Function test_23_printer_models_tests has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    def test_23_printer_models_tests(self):
                                                        '''
                                                        Test 23: test the API to retrieve the list of printer models
                                                        '''
                                                        if DISABLE_TESTS: return
                                                Severity: Minor
                                                Found in gecoscc/tests.py - About 1 hr to fix

                                                  Function test_19_delete_ou_with_group has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      def test_19_delete_ou_with_group(self, get_chef_api_method,
                                                          get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                          ChefNodeClass, isinstance_method, gettext,
                                                          create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                          '''
                                                  Severity: Minor
                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                    Function test_30_test_error_generation has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        def test_30_test_error_generation(self, get_chef_api_method,
                                                            get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                            ChefNodeClass, isinstance_method, gettext,
                                                            create_chef_admin_user_method):
                                                            '''
                                                    Severity: Minor
                                                    Found in gecoscc/tests.py - About 1 hr to fix

                                                      Function test_12_move_user has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          def test_12_move_user(self, get_chef_api_method, get_cookbook_method,
                                                              get_cookbook_method_tasks, NodeClass, ChefNodeClass, isinstance_method,
                                                              gettext, create_chef_admin_user_method):
                                                              '''
                                                              Test 12:
                                                      Severity: Minor
                                                      Found in gecoscc/tests.py - About 1 hr to fix

                                                        Function test_02_update_resources_workstation has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            def test_02_update_resources_workstation(self, get_chef_api_method,
                                                                get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                ChefNodeClass, isinstance_method, gettext,
                                                                create_chef_admin_user_method):
                                                                '''
                                                        Severity: Minor
                                                        Found in gecoscc/tests.py - About 1 hr to fix

                                                          Function test_17_delete_ou_with_workstation_and_user_in_domain has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              def test_17_delete_ou_with_workstation_and_user_in_domain(self,
                                                          Severity: Major
                                                          Found in gecoscc/tests.py - About 1 hr to fix

                                                            Function test_18_delete_ou_with_user_and_workstation_in_domain has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                def test_18_delete_ou_with_user_and_workstation_in_domain(self,
                                                            Severity: Major
                                                            Found in gecoscc/tests.py - About 1 hr to fix

                                                              Function test_19_delete_ou_with_group has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                  def test_19_delete_ou_with_group(self, get_chef_api_method,
                                                              Severity: Major
                                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                                Function test_30_recalc_command_cert_policy has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                    def test_30_recalc_command_cert_policy(self, get_chef_api_method,
                                                                Severity: Major
                                                                Found in gecoscc/tests.py - About 1 hr to fix

                                                                  Function test_03_priority_ous_workstation has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                                  Open

                                                                      def test_03_priority_ous_workstation(self, get_chef_api_method,
                                                                          get_cookbook_method, get_cookbook_method_tasks,
                                                                          NodeClass, ChefNodeClass, isinstance_method):
                                                                          '''
                                                                          Test 3:
                                                                  Severity: Minor
                                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                                  Cognitive Complexity

                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                  Further reading

                                                                  Function test_22_delete_group_in_domain_with_politic has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                      def test_22_delete_group_in_domain_with_politic(self, get_chef_api_method,
                                                                  Severity: Major
                                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                                    Function test_29_cert_policy has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                        def test_29_cert_policy(self, get_chef_api_method, get_cookbook_method,
                                                                    Severity: Major
                                                                    Found in gecoscc/tests.py - About 1 hr to fix

                                                                      Function test_24_delete_OU_without_group_inside has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                      Open

                                                                          def test_24_delete_OU_without_group_inside(self, get_chef_api_method,
                                                                      Severity: Major
                                                                      Found in gecoscc/tests.py - About 1 hr to fix

                                                                        Function test_21_delete_group_with_politic has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                            def test_21_delete_group_with_politic(self, get_chef_api_method,
                                                                        Severity: Major
                                                                        Found in gecoscc/tests.py - About 1 hr to fix

                                                                          Function test_23_delete_group_in_domain_with_workstation_and_user has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                              def test_23_delete_group_in_domain_with_workstation_and_user(self,
                                                                          Severity: Major
                                                                          Found in gecoscc/tests.py - About 1 hr to fix

                                                                            Function test_20_delete_group_with_workstation_and_user has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                            Open

                                                                                def test_20_delete_group_with_workstation_and_user(self,
                                                                            Severity: Major
                                                                            Found in gecoscc/tests.py - About 1 hr to fix

                                                                              Function test_32_refresh_policies has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                                              Open

                                                                                  def test_32_refresh_policies(self, get_chef_api_method,
                                                                              Severity: Major
                                                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                                                Function test_20_delete_group_with_workstation_and_user has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                    def test_20_delete_group_with_workstation_and_user(self,
                                                                                        get_chef_api_method, get_cookbook_method, get_cookbook_method_tasks,
                                                                                        NodeClass, ChefNodeClass, isinstance_method, gettext,
                                                                                        create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                                                        '''
                                                                                Severity: Minor
                                                                                Found in gecoscc/tests.py - About 1 hr to fix

                                                                                  Function test_01_printers_movements has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                      def test_01_printers_movements(self, get_chef_api_method,
                                                                                          get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                          ChefNodeClass, isinstance_method, gettext,
                                                                                          create_chef_admin_user_method):
                                                                                          '''
                                                                                  Severity: Minor
                                                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                                                    Function test_20_computer_CRUD has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def test_20_computer_CRUD(self, get_chef_api_method,
                                                                                            get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                            ChefNodeClass, isinstance_method, gettext,
                                                                                            create_chef_admin_user_method):
                                                                                            '''
                                                                                    Severity: Minor
                                                                                    Found in gecoscc/tests.py - About 1 hr to fix

                                                                                      Function test_14_printer_visibility has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                          def test_14_printer_visibility(self, get_chef_api_method,
                                                                                              get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                              ChefNodeClass, isinstance_method, gettext,
                                                                                              create_chef_admin_user_method):
                                                                                              '''
                                                                                      Severity: Minor
                                                                                      Found in gecoscc/tests.py - About 1 hr to fix

                                                                                        Function test_34_login_view has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                        Open

                                                                                            def test_34_login_view(self, get_chef_api_method,
                                                                                        Severity: Major
                                                                                        Found in gecoscc/tests.py - About 1 hr to fix

                                                                                          Function test_13_resports_status has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                          Open

                                                                                              def test_13_resports_status(self, get_chef_api_method, get_cookbook_method,
                                                                                          Severity: Major
                                                                                          Found in gecoscc/tests.py - About 1 hr to fix

                                                                                            Function test_03_admins has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                            Open

                                                                                                def test_03_admins(self, adminuservariablesmodel,
                                                                                            Severity: Major
                                                                                            Found in gecoscc/tests.py - About 1 hr to fix

                                                                                              Function test_24_delete_OU_without_group_inside has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  def test_24_delete_OU_without_group_inside(self, get_chef_api_method,
                                                                                                      get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                      ChefNodeClass, isinstance_method, gettext,
                                                                                                      create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                                                                      '''
                                                                                              Severity: Minor
                                                                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                Function test_29_cert_policy has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                    def test_29_cert_policy(self, get_chef_api_method, get_cookbook_method,
                                                                                                        get_cookbook_method_tasks, NodeClass, ChefNodeClass, isinstance_method,
                                                                                                        gettext, create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                                                                        '''
                                                                                                        Test 29:
                                                                                                Severity: Minor
                                                                                                Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                  Function test_03_repository_movements has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      def test_03_repository_movements(self, get_chef_api_method,
                                                                                                          get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                          ChefNodeClass, isinstance_method, gettext,
                                                                                                          create_chef_admin_user_method):
                                                                                                          '''
                                                                                                  Severity: Minor
                                                                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                    Function test_04_groups_movements has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                        def test_04_groups_movements(self, get_chef_api_method, get_cookbook_method,
                                                                                                            get_cookbook_method_tasks, NodeClass, ChefNodeClass, isinstance_method,
                                                                                                            gettext, create_chef_admin_user_method):
                                                                                                            '''
                                                                                                            Test 04:
                                                                                                    Severity: Minor
                                                                                                    Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                      Function test_11_move_workstation has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                          def test_11_move_workstation(self, get_chef_api_method,
                                                                                                              get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                              ChefNodeClass, isinstance_method, gettext,
                                                                                                              create_chef_admin_user_method):
                                                                                                              '''
                                                                                                      Severity: Minor
                                                                                                      Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                        Function test_11_chef_client_run has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                            def test_11_chef_client_run(self, get_chef_api_method,
                                                                                                                get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                                ChefNodeClass, isinstance_method, gettext,
                                                                                                                create_chef_admin_user_method):
                                                                                                                '''
                                                                                                        Severity: Minor
                                                                                                        Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                          Function test_17_delete_ou_with_workstation_and_user_in_domain has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                              def test_17_delete_ou_with_workstation_and_user_in_domain(self,
                                                                                                                  get_chef_api_method, get_cookbook_method, get_cookbook_method_tasks,
                                                                                                                  NodeClass, ChefNodeClass, isinstance_method, gettext,
                                                                                                                  create_chef_admin_user_method, TaskNodeClass, TaskClientClass):
                                                                                                                  '''
                                                                                                          Severity: Minor
                                                                                                          Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                            Function test_11_chef_client_run has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                def test_11_chef_client_run(self, get_chef_api_method,
                                                                                                            Severity: Major
                                                                                                            Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                              Function test_12_upload_logs has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                  def test_12_upload_logs(self, get_chef_api_method,
                                                                                                              Severity: Major
                                                                                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                Function test_20_computer_CRUD has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                    def test_20_computer_CRUD(self, get_chef_api_method,
                                                                                                                Severity: Major
                                                                                                                Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                  Function test_33_check_update_node has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      def test_33_check_update_node(self, get_chef_api_method,
                                                                                                                  Severity: Major
                                                                                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                    Function test_32_check_is_ou_empty has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        def test_32_check_is_ou_empty(self, get_chef_api_method,
                                                                                                                    Severity: Major
                                                                                                                    Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                      Function test_05_priority_workstation_ous_groups has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                          def test_05_priority_workstation_ous_groups(self, get_chef_api_method,
                                                                                                                      Severity: Major
                                                                                                                      Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                        Function test_06_priority_workstation_groups has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                            def test_06_priority_workstation_groups(self, get_chef_api_method,
                                                                                                                        Severity: Major
                                                                                                                        Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                          Function test_08_priority_user_ous_groups has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                              def test_08_priority_user_ous_groups(self, get_chef_api_method,
                                                                                                                          Severity: Major
                                                                                                                          Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                            Function test_04_priority_user_workstation has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                def test_04_priority_user_workstation(self, get_chef_api_method,
                                                                                                                            Severity: Major
                                                                                                                            Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                              Function test_07_priority_workstation_groups_different_ou has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                                  def test_07_priority_workstation_groups_different_ou(self,
                                                                                                                              Severity: Major
                                                                                                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                Function test_15_shared_folder_visibility has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                Open

                                                                                                                                    def test_15_shared_folder_visibility(self, get_chef_api_method, 
                                                                                                                                Severity: Major
                                                                                                                                Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                  Function test_09_priority_user_groups_same_ou has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                      def test_09_priority_user_groups_same_ou(self, get_chef_api_method,
                                                                                                                                  Severity: Major
                                                                                                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                    Function test_10_priority_user_groups_different_ou has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        def test_10_priority_user_groups_different_ou(self, get_chef_api_method,
                                                                                                                                    Severity: Major
                                                                                                                                    Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                      Function test_16_repository_visibility has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                          def test_16_repository_visibility(self, get_chef_api_method,
                                                                                                                                      Severity: Major
                                                                                                                                      Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                        Function test_30_test_error_generation has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                        Open

                                                                                                                                            def test_30_test_error_generation(self, get_chef_api_method,
                                                                                                                                        Severity: Major
                                                                                                                                        Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                          Function test_31_check_obj_is_related has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                          Open

                                                                                                                                              def test_31_check_obj_is_related(self, get_chef_api_method,
                                                                                                                                          Severity: Major
                                                                                                                                          Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                            Function test_11_move_workstation has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                            Open

                                                                                                                                                def test_11_move_workstation(self, get_chef_api_method,
                                                                                                                                            Severity: Major
                                                                                                                                            Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                              Function test_14_printer_visibility has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                  def test_14_printer_visibility(self, get_chef_api_method,
                                                                                                                                              Severity: Major
                                                                                                                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                Function test_01_update_resources_user has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                    def test_01_update_resources_user(self, get_chef_api_method,
                                                                                                                                                Severity: Major
                                                                                                                                                Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                  Function test_07_computer has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                  Open

                                                                                                                                                      def test_07_computer(self, get_chef_api_method, get_cookbook_method,
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                    Function test_12_move_user has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def test_12_move_user(self, get_chef_api_method, get_cookbook_method,
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                      Function test_13_group_visibility has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                          def test_13_group_visibility(self, get_chef_api_method, get_cookbook_method,
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                        Function test_13_update_chef_status has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                        Open

                                                                                                                                                            def test_13_update_chef_status(self, get_chef_api_method,
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                          Function test_02_update_resources_workstation has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                              def test_02_update_resources_workstation(self, get_chef_api_method,
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                            Function test_01_printers_movements has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                            Open

                                                                                                                                                                def test_01_printers_movements(self, get_chef_api_method,
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                              Function test_06_OUs_movements has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                              Open

                                                                                                                                                                  def test_06_OUs_movements(self, get_chef_api_method, get_cookbook_method,
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                Function test_04_groups_movements has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                Open

                                                                                                                                                                    def test_04_groups_movements(self, get_chef_api_method, get_cookbook_method,
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                  Function test_08_complete_policy has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                  Open

                                                                                                                                                                      def test_08_complete_policy(self, get_chef_api_method, get_cookbook_method,
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                    Function test_07_OUs_movements_domain has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                    Open

                                                                                                                                                                        def test_07_OUs_movements_domain(self, get_chef_api_method,
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                      Function test_28_repositories_are_mergeables has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                      Open

                                                                                                                                                                          def test_28_repositories_are_mergeables(self, get_chef_api_method,
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                        Function test_02_shared_folder_movements has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                        Open

                                                                                                                                                                            def test_02_shared_folder_movements(self, get_chef_api_method, 
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                          Function test_05_groups_movements_domain has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                          Open

                                                                                                                                                                              def test_05_groups_movements_domain(self, get_chef_api_method,
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                            Function test_26_priority_user_and_group has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                            Open

                                                                                                                                                                                def test_26_priority_user_and_group(self, get_chef_api_method, 
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                              Function test_03_repository_movements has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                              Open

                                                                                                                                                                                  def test_03_repository_movements(self, get_chef_api_method,
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in gecoscc/tests.py - About 1 hr to fix

                                                                                                                                                                                Function test_02_updates has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                    def test_02_updates(self, update_model, gettext, gettext_forms, gettext_models,
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in gecoscc/tests.py - About 50 mins to fix

                                                                                                                                                                                  Function test_04_maintenance_mode has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                      def test_04_maintenance_mode(self, maintenancemodel,
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in gecoscc/tests.py - About 50 mins to fix

                                                                                                                                                                                    Function test_03_priority_ous_workstation has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                    Open

                                                                                                                                                                                        def test_03_priority_ous_workstation(self, get_chef_api_method,
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                      Function test_29_delete_old_policies has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                      Open

                                                                                                                                                                                          def test_29_delete_old_policies(self, get_chef_api_method,
                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                      Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                        Function test_28_debug_mode_expiration_command has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                            def test_28_debug_mode_expiration_command(self, get_chef_api_method,
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                          Function test_25_priority_grouped_ous_workstation has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                          Open

                                                                                                                                                                                              def test_25_priority_grouped_ous_workstation(self, get_chef_api_method, 
                                                                                                                                                                                                  get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                                                                                                                  ChefNodeClass, isinstance_method):
                                                                                                                                                                                                  '''
                                                                                                                                                                                                  Test 25:
                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                          Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                          Cognitive Complexity

                                                                                                                                                                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                          A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                          • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                          • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                          Further reading

                                                                                                                                                                                          Function test_26_priority_user_and_group has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                          Open

                                                                                                                                                                                              def test_26_priority_user_and_group(self, get_chef_api_method, 
                                                                                                                                                                                                  get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                                                                                                                  ChefNodeClass, isinstance_method, gettext,
                                                                                                                                                                                                  create_chef_admin_user_method):
                                                                                                                                                                                                  '''
                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                          Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                          Cognitive Complexity

                                                                                                                                                                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                          A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                          • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                          • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                          Further reading

                                                                                                                                                                                          Function test_05_statistics has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                          Open

                                                                                                                                                                                              def test_05_statistics(self, gettext, gettext_forms, gettext_models,
                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                          Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                            Function test_10_priority_user_groups_different_ou has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                            Open

                                                                                                                                                                                                def test_10_priority_user_groups_different_ou(self, get_chef_api_method,
                                                                                                                                                                                                    get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                                                                                                                    ChefNodeClass, isinstance_method, gettext,
                                                                                                                                                                                                    create_chef_admin_user_method):
                                                                                                                                                                                                    '''
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                            Cognitive Complexity

                                                                                                                                                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                            A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                            Further reading

                                                                                                                                                                                            Function test_25_priority_grouped_ous_workstation has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                            Open

                                                                                                                                                                                                def test_25_priority_grouped_ous_workstation(self, get_chef_api_method, 
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                              Function test_05_priority_workstation_ous_groups has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                              Open

                                                                                                                                                                                                  def test_05_priority_workstation_ous_groups(self, get_chef_api_method,
                                                                                                                                                                                                      get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                                                                                                                      ChefNodeClass, isinstance_method, gettext,
                                                                                                                                                                                                      create_chef_admin_user_method):
                                                                                                                                                                                                      '''
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                              Cognitive Complexity

                                                                                                                                                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                              A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                              Further reading

                                                                                                                                                                                              Function test_06_priority_workstation_groups has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                              Open

                                                                                                                                                                                                  def test_06_priority_workstation_groups(self, get_chef_api_method,
                                                                                                                                                                                                      get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                                                                                                                      ChefNodeClass, isinstance_method, gettext,
                                                                                                                                                                                                      create_chef_admin_user_method):
                                                                                                                                                                                                      '''
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                              Cognitive Complexity

                                                                                                                                                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                              A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                              Further reading

                                                                                                                                                                                              Function test_08_priority_user_ous_groups has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                              Open

                                                                                                                                                                                                  def test_08_priority_user_ous_groups(self, get_chef_api_method,
                                                                                                                                                                                                      get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                                                                                                                      ChefNodeClass, isinstance_method, gettext,
                                                                                                                                                                                                      create_chef_admin_user_method):
                                                                                                                                                                                                      '''
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                              Cognitive Complexity

                                                                                                                                                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                              A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                              Further reading

                                                                                                                                                                                              Function test_07_priority_workstation_groups_different_ou has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                              Open

                                                                                                                                                                                                  def test_07_priority_workstation_groups_different_ou(self,
                                                                                                                                                                                                      get_chef_api_method, get_cookbook_method, get_cookbook_method_tasks,
                                                                                                                                                                                                      NodeClass, ChefNodeClass, isinstance_method, gettext,
                                                                                                                                                                                                      create_chef_admin_user_method):
                                                                                                                                                                                                      '''
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                              Cognitive Complexity

                                                                                                                                                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                              A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                              Further reading

                                                                                                                                                                                              Function test_09_priority_user_groups_same_ou has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                              Open

                                                                                                                                                                                                  def test_09_priority_user_groups_same_ou(self, get_chef_api_method,
                                                                                                                                                                                                      get_cookbook_method, get_cookbook_method_tasks, NodeClass,
                                                                                                                                                                                                      ChefNodeClass, isinstance_method, gettext,
                                                                                                                                                                                                      create_chef_admin_user_method):
                                                                                                                                                                                                      '''
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in gecoscc/tests.py - About 45 mins to fix

                                                                                                                                                                                              Cognitive Complexity

                                                                                                                                                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                              A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                              Further reading

                                                                                                                                                                                              Function create_chef_admin_user_mock has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                              Open

                                                                                                                                                                                              def create_chef_admin_user_mock(api, settings, username, password=None,
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in gecoscc/tests.py - About 35 mins to fix

                                                                                                                                                                                                Function update_node has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                Open

                                                                                                                                                                                                    def update_node(self, obj, field_name, field_value, api_class,
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in gecoscc/tests.py - About 35 mins to fix

                                                                                                                                                                                                  Function _get_chef_api_mock has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                  def _get_chef_api_mock(chef_url, username, chef_pem, chef_ssl_verify,
                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                  Found in gecoscc/tests.py - About 35 mins to fix

                                                                                                                                                                                                    Function assertEqualObjects has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                        def assertEqualObjects(self, data, new_data, schema_data=None,
                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                    Found in gecoscc/tests.py - About 35 mins to fix

                                                                                                                                                                                                      Function get_dotted has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          def get_dotted(self, key):
                                                                                                                                                                                                              data = self.data
                                                                                                                                                                                                              for k in key.split('.'):
                                                                                                                                                                                                                  if k not in data:
                                                                                                                                                                                                                      if self.node_attr_type == 'attributes':
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in gecoscc/tests.py - About 35 mins to fix

                                                                                                                                                                                                      Cognitive Complexity

                                                                                                                                                                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                      A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                      Further reading

                                                                                                                                                                                                      Function assertEqualObjects has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          def assertEqualObjects(self, data, new_data, schema_data=None,
                                                                                                                                                                                                              schema_new_data=None, fields=None):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Useful method, check the second dictionary has the same values than
                                                                                                                                                                                                              the first. The second dictionary could have other attrs
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in gecoscc/tests.py - About 25 mins to fix

                                                                                                                                                                                                      Cognitive Complexity

                                                                                                                                                                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                      A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                      Further reading

                                                                                                                                                                                                      Function get_dummy_json_put_request has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          def get_dummy_json_put_request(self, data, schema=None, is_superuser=True,
                                                                                                                                                                                                              path=None):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Useful method, returns a typical put request
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in gecoscc/tests.py - About 25 mins to fix

                                                                                                                                                                                                      Cognitive Complexity

                                                                                                                                                                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                      A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                      Further reading

                                                                                                                                                                                                      Function data_validated_hook_user has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          def data_validated_hook_user(self, data):
                                                                                                                                                                                                              for i, comp in enumerate(data.get('computers', [])):
                                                                                                                                                                                                                  comp_id = data['computers'][i]
                                                                                                                                                                                                                  if isinstance(comp_id, string_types):
                                                                                                                                                                                                                      data['computers'][i] = ObjectId(comp_id)
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in gecoscc/tests.py - About 25 mins to fix

                                                                                                                                                                                                      Cognitive Complexity

                                                                                                                                                                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                      A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                      Further reading

                                                                                                                                                                                                      Function get_dummy_request has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          def get_dummy_request(self, is_superuser=True):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Useful method, returns a typical request, with the same request
                                                                                                                                                                                                              properties than pyramid add (see gecoscc/__init__)
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in gecoscc/tests.py - About 25 mins to fix

                                                                                                                                                                                                      Cognitive Complexity

                                                                                                                                                                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                                                                      A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                                                                      Further reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                          @mock.patch('chef.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.ChefNode')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 1 wk to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 3814..3929

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 872.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                          @mock.patch('chef.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.ChefNode')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 1 wk to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 3697..3812

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 872.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              for policy in policies:
                                                                                                                                                                                                                  # 4 - Add policy in OU
                                                                                                                                                                                                                  ou_1['policies'] = {text_type(policies[policy]['policy']['_id']):
                                                                                                                                                                                                                      policies[policy]['policy_data_node_1']}
                                                                                                                                                                                                                  node_policy = self.add_and_get_policy(node=ou_1,
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 4 days to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 3434..3482
                                                                                                                                                                                                      gecoscc/tests.py on lines 3537..3585

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 413.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              for policy in policies:
                                                                                                                                                                                                                  # 6 - Add policy in A group
                                                                                                                                                                                                                  group_a['policies'] = {text_type(policies[policy]['policy']['_id']):
                                                                                                                                                                                                                      policies[policy]['policy_data_node_1']}
                                                                                                                                                                                                                  group_a_policy = self.add_and_get_policy(node=group_a,
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 4 days to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 3332..3378
                                                                                                                                                                                                      gecoscc/tests.py on lines 3537..3585

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 413.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              for policy in policies:
                                                                                                                                                                                                                  # 6 - Add policy in A group
                                                                                                                                                                                                                  group_a['policies'] = {text_type(policies[policy]['policy']['_id']):
                                                                                                                                                                                                                      policies[policy]['policy_data_node_1']}
                                                                                                                                                                                                                  group_a_policy = self.add_and_get_policy(node=group_a,
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 4 days to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 3332..3378
                                                                                                                                                                                                      gecoscc/tests.py on lines 3434..3482

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 413.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                          def test_08_OU(self, get_cookbook_method, get_cookbook_method_tasks):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 8: Create, update and delete a OU
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 day to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1409..1444
                                                                                                                                                                                                      gecoscc/tests.py on lines 1446..1480
                                                                                                                                                                                                      gecoscc/tests.py on lines 1482..1516
                                                                                                                                                                                                      gecoscc/tests.py on lines 1518..1550

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 153.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                          def test_02_printers(self, get_cookbook_method, get_cookbook_method_tasks):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 2: Create, update and delete a printer
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 day to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1446..1480
                                                                                                                                                                                                      gecoscc/tests.py on lines 1482..1516
                                                                                                                                                                                                      gecoscc/tests.py on lines 1518..1550
                                                                                                                                                                                                      gecoscc/tests.py on lines 1627..1661

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 153.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                          def test_03_shared_folder(self, get_cookbook_method,
                                                                                                                                                                                                                  get_cookbook_method_tasks):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 day to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1409..1444
                                                                                                                                                                                                      gecoscc/tests.py on lines 1482..1516
                                                                                                                                                                                                      gecoscc/tests.py on lines 1518..1550
                                                                                                                                                                                                      gecoscc/tests.py on lines 1627..1661

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 153.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                          def test_05_user(self, get_cookbook_method, get_cookbook_method_tasks):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 5: Create, update and delete an user
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 day to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1409..1444
                                                                                                                                                                                                      gecoscc/tests.py on lines 1446..1480
                                                                                                                                                                                                      gecoscc/tests.py on lines 1482..1516
                                                                                                                                                                                                      gecoscc/tests.py on lines 1627..1661

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 153.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                          def test_04_repository(self, get_cookbook_method,
                                                                                                                                                                                                              get_cookbook_method_tasks):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 day to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1409..1444
                                                                                                                                                                                                      gecoscc/tests.py on lines 1446..1480
                                                                                                                                                                                                      gecoscc/tests.py on lines 1518..1550
                                                                                                                                                                                                      gecoscc/tests.py on lines 1627..1661

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 153.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.views.report_computer._')
                                                                                                                                                                                                          def test_08_resports_computers(self, gettext_method):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 8: Computers report
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 7 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 7037..7056
                                                                                                                                                                                                      gecoscc/tests.py on lines 7059..7078
                                                                                                                                                                                                      gecoscc/tests.py on lines 7081..7100
                                                                                                                                                                                                      gecoscc/tests.py on lines 7168..7187
                                                                                                                                                                                                      gecoscc/tests.py on lines 7191..7210

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 121.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.views.report_storages._')
                                                                                                                                                                                                          def test_15_reports_storages(self, gettext_method):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 15: Storages reports 
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 7 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 7015..7034
                                                                                                                                                                                                      gecoscc/tests.py on lines 7037..7056
                                                                                                                                                                                                      gecoscc/tests.py on lines 7059..7078
                                                                                                                                                                                                      gecoscc/tests.py on lines 7081..7100
                                                                                                                                                                                                      gecoscc/tests.py on lines 7168..7187

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 121.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.views.report_no_computer_users._')
                                                                                                                                                                                                          def test_09_resports_no_computers_users(self, gettext_method):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 9: Users without computers
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 7 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 7015..7034
                                                                                                                                                                                                      gecoscc/tests.py on lines 7059..7078
                                                                                                                                                                                                      gecoscc/tests.py on lines 7081..7100
                                                                                                                                                                                                      gecoscc/tests.py on lines 7168..7187
                                                                                                                                                                                                      gecoscc/tests.py on lines 7191..7210

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 121.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.views.report_no_user_computers._')
                                                                                                                                                                                                          def test_10_resports_no_user_computers(self, gettext_method):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 10: Computers without users 
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 7 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 7015..7034
                                                                                                                                                                                                      gecoscc/tests.py on lines 7037..7056
                                                                                                                                                                                                      gecoscc/tests.py on lines 7081..7100
                                                                                                                                                                                                      gecoscc/tests.py on lines 7168..7187
                                                                                                                                                                                                      gecoscc/tests.py on lines 7191..7210

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 121.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.views.report_permission._')
                                                                                                                                                                                                          def test_11_resports_permissions(self, gettext_method):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 11: Permissions report 
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 7 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 7015..7034
                                                                                                                                                                                                      gecoscc/tests.py on lines 7037..7056
                                                                                                                                                                                                      gecoscc/tests.py on lines 7059..7078
                                                                                                                                                                                                      gecoscc/tests.py on lines 7168..7187
                                                                                                                                                                                                      gecoscc/tests.py on lines 7191..7210

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 121.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.views.report_user._')
                                                                                                                                                                                                          def test_14_resports_user(self, gettext_method):
                                                                                                                                                                                                              '''
                                                                                                                                                                                                              Test 14: User report 
                                                                                                                                                                                                              '''
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 7 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 7015..7034
                                                                                                                                                                                                      gecoscc/tests.py on lines 7037..7056
                                                                                                                                                                                                      gecoscc/tests.py on lines 7059..7078
                                                                                                                                                                                                      gecoscc/tests.py on lines 7081..7100
                                                                                                                                                                                                      gecoscc/tests.py on lines 7191..7210

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 121.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          def data_validated_hook_computer(self, data):
                                                                                                                                                                                                              for i, member in enumerate(data.get('memberof', [])):
                                                                                                                                                                                                                  member_id = data['memberof'][i]
                                                                                                                                                                                                                  if isinstance(member_id, string_types):
                                                                                                                                                                                                                      data['memberof'][i] = ObjectId(member_id)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 859..863

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 74.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          def data_validated_hook_group(self, data):
                                                                                                                                                                                                              for i, comp in enumerate(data.get('members', [])):
                                                                                                                                                                                                                  comp_id = data['members'][i]
                                                                                                                                                                                                                  if isinstance(comp_id, string_types):
                                                                                                                                                                                                                      data['members'][i] = ObjectId(comp_id)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 853..857

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 74.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4418..4427
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Identical blocks of code found in 11 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 10 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 4487..4496
                                                                                                                                                                                                      gecoscc/tests.py on lines 4573..4582
                                                                                                                                                                                                      gecoscc/tests.py on lines 4651..4660
                                                                                                                                                                                                      gecoscc/tests.py on lines 4730..4739
                                                                                                                                                                                                      gecoscc/tests.py on lines 4821..4830
                                                                                                                                                                                                      gecoscc/tests.py on lines 4912..4921
                                                                                                                                                                                                      gecoscc/tests.py on lines 4994..5003
                                                                                                                                                                                                      gecoscc/tests.py on lines 5303..5312
                                                                                                                                                                                                      gecoscc/tests.py on lines 5382..5391
                                                                                                                                                                                                      gecoscc/tests.py on lines 5601..5610

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.forms.create_chef_admin_user')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.views.portal._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                          @mock.patch('chef.Node')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 6646..6654
                                                                                                                                                                                                      gecoscc/tests.py on lines 7130..7138

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 64.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.views.report_status._')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Client')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.Node')
                                                                                                                                                                                                          @mock.patch('chef.Node')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2746..2754
                                                                                                                                                                                                      gecoscc/tests.py on lines 6646..6654

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 64.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.models.get_chef_api')    
                                                                                                                                                                                                          @mock.patch('gecoscc.utils._get_chef_api')    
                                                                                                                                                                                                          @mock.patch('gecoscc.views.admins._')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.models.gettext')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2746..2754
                                                                                                                                                                                                      gecoscc/tests.py on lines 7130..7138

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 64.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              printer_update = self.update_node(obj=new_printer, field_name='path',
                                                                                                                                                                                                                  field_value=ou_2['path'] + ',' + text_type(ou_2['_id']),
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5963..5964

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 53.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              repository_update = self.update_node(obj=repository, field_name='path',
                                                                                                                                                                                                                  field_value=ou_2['path'] + ',' + text_type(ou_2['_id']),
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5780..5781

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 53.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.models.get_chef_api')    
                                                                                                                                                                                                          @mock.patch('gecoscc.utils._get_chef_api')    
                                                                                                                                                                                                          @mock.patch('gecoscc.views.admins._')
                                                                                                                                                                                                          @mock.patch('gecoscc.models.gettext')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 6859..6865

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 50.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.models.get_chef_api')    
                                                                                                                                                                                                          @mock.patch('gecoscc.utils._get_chef_api')    
                                                                                                                                                                                                          @mock.patch('gecoscc.views.admins._')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.models.gettext')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 6484..6490

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 50.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                  "remote_shutdown_res": {'policy':
                                                                                                                                                                                                                      self.get_default_ws_policy(slug='remote_shutdown_res'),
                                                                                                                                                                                                                      'path': self.get_default_ws_policy(slug=
                                                                                                                                                                                                                          'remote_shutdown_res')['path'] + '.shutdown_mode',
                                                                                                                                                                                                                      'policy_data_node_1': {'shutdown_mode': 'reboot'},
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1337..1343

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 47.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                  "desktop_background_res": {
                                                                                                                                                                                                                      'policy': self.get_default_user_policy(
                                                                                                                                                                                                                          slug='desktop_background_res'),
                                                                                                                                                                                                                      'path': self.get_default_user_policy(
                                                                                                                                                                                                                          slug="desktop_background_res")['path'] + '.users.',
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1319..1324

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 47.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                          @mock.patch('chef.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.ChefNode')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2426..2431
                                                                                                                                                                                                      gecoscc/tests.py on lines 2479..2484
                                                                                                                                                                                                      gecoscc/tests.py on lines 5069..5074
                                                                                                                                                                                                      gecoscc/tests.py on lines 6944..6949

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                          @mock.patch('chef.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.ChefNode')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2426..2431
                                                                                                                                                                                                      gecoscc/tests.py on lines 2479..2484
                                                                                                                                                                                                      gecoscc/tests.py on lines 3014..3019
                                                                                                                                                                                                      gecoscc/tests.py on lines 6944..6949

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                          @mock.patch('chef.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.ChefNode')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2426..2431
                                                                                                                                                                                                      gecoscc/tests.py on lines 3014..3019
                                                                                                                                                                                                      gecoscc/tests.py on lines 5069..5074
                                                                                                                                                                                                      gecoscc/tests.py on lines 6944..6949

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              try:
                                                                                                                                                                                                                  storage_update = self.update_node(obj=new_storage,
                                                                                                                                                                                                                      field_name='path', field_value=ou_2['path'],
                                                                                                                                                                                                                      api_class=StorageResource, is_superuser=False)
                                                                                                                                                                                                              except HTTPForbidden:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5754..5759
                                                                                                                                                                                                      gecoscc/tests.py on lines 5940..5945
                                                                                                                                                                                                      gecoscc/tests.py on lines 6110..6115
                                                                                                                                                                                                      gecoscc/tests.py on lines 6154..6160
                                                                                                                                                                                                      gecoscc/tests.py on lines 6217..6223

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              try:
                                                                                                                                                                                                                  group_update = self.update_node(obj=new_group, field_name='path',
                                                                                                                                                                                                                      field_value=domain['path'], api_class=GroupResource,
                                                                                                                                                                                                                      is_superuser=True)
                                                                                                                                                                                                              except KeyError:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5754..5759
                                                                                                                                                                                                      gecoscc/tests.py on lines 5857..5862
                                                                                                                                                                                                      gecoscc/tests.py on lines 5940..5945
                                                                                                                                                                                                      gecoscc/tests.py on lines 6154..6160
                                                                                                                                                                                                      gecoscc/tests.py on lines 6217..6223

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.models.get_chef_api')    
                                                                                                                                                                                                          @mock.patch('gecoscc.utils._get_chef_api')    
                                                                                                                                                                                                          @mock.patch('gecoscc.views.admins._')
                                                                                                                                                                                                          @mock.patch('gecoscc.forms._')
                                                                                                                                                                                                          @mock.patch('gecoscc.models.gettext')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2426..2431
                                                                                                                                                                                                      gecoscc/tests.py on lines 2479..2484
                                                                                                                                                                                                      gecoscc/tests.py on lines 3014..3019
                                                                                                                                                                                                      gecoscc/tests.py on lines 5069..5074

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              try:
                                                                                                                                                                                                                  ou_moved = self.update_node(obj=ou_1, field_name='path',
                                                                                                                                                                                                                      field_value=domain['path'],
                                                                                                                                                                                                                      api_class=OrganisationalUnitResource,
                                                                                                                                                                                                                      is_superuser=True)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5754..5759
                                                                                                                                                                                                      gecoscc/tests.py on lines 5857..5862
                                                                                                                                                                                                      gecoscc/tests.py on lines 5940..5945
                                                                                                                                                                                                      gecoscc/tests.py on lines 6110..6115
                                                                                                                                                                                                      gecoscc/tests.py on lines 6154..6160

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              try:
                                                                                                                                                                                                                  ou_moved = self.update_node(obj=new_ou, field_name='path',
                                                                                                                                                                                                                      field_value=ou_1['path'], api_class=OrganisationalUnitResource,
                                                                                                                                                                                                                      is_superuser=False)
                                                                                                                                                                                                      
                                                                                                                                                                                                      
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5754..5759
                                                                                                                                                                                                      gecoscc/tests.py on lines 5857..5862
                                                                                                                                                                                                      gecoscc/tests.py on lines 5940..5945
                                                                                                                                                                                                      gecoscc/tests.py on lines 6110..6115
                                                                                                                                                                                                      gecoscc/tests.py on lines 6217..6223

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          @mock.patch('gecoscc.utils.isinstance')
                                                                                                                                                                                                          @mock.patch('chef.Node')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.ChefNode')
                                                                                                                                                                                                          @mock.patch('gecoscc.tasks.get_cookbook')
                                                                                                                                                                                                          @mock.patch('gecoscc.utils.get_cookbook')
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 4 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2479..2484
                                                                                                                                                                                                      gecoscc/tests.py on lines 3014..3019
                                                                                                                                                                                                      gecoscc/tests.py on lines 5069..5074
                                                                                                                                                                                                      gecoscc/tests.py on lines 6944..6949

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              try:
                                                                                                                                                                                                                  repository_update = self.update_node(obj=new_repository,
                                                                                                                                                                                                                      field_name='path', field_value=ou_1['path'],
                                                                                                                                                                                                                      api_class=RepositoryResource, is_superuser=False)
                                                                                                                                                                                                              except HTTPForbidden:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5754..5759
                                                                                                                                                                                                      gecoscc/tests.py on lines 5857..5862
                                                                                                                                                                                                      gecoscc/tests.py on lines 6110..6115
                                                                                                                                                                                                      gecoscc/tests.py on lines 6154..6160
                                                                                                                                                                                                      gecoscc/tests.py on lines 6217..6223

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              try:
                                                                                                                                                                                                                  printer_update = self.update_node(obj=new_printer,
                                                                                                                                                                                                                      field_name='path', field_value=ou_1['path'],
                                                                                                                                                                                                                      api_class=PrinterResource, is_superuser=False)
                                                                                                                                                                                                              except HTTPForbidden:
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5857..5862
                                                                                                                                                                                                      gecoscc/tests.py on lines 5940..5945
                                                                                                                                                                                                      gecoscc/tests.py on lines 6110..6115
                                                                                                                                                                                                      gecoscc/tests.py on lines 6154..6160
                                                                                                                                                                                                      gecoscc/tests.py on lines 6217..6223

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 43.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              ou_1['policies'] = {text_type(cert_res['_id']): {'java_keystores': 
                                                                                                                                                                                                                  ["keystore_ou"], 'ca_root_certs': [{'name': "cert_ou",
                                                                                                                                                                                                                      'uri': "uri_ou"}]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5366..5368

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 41.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              computer['policies'] = {text_type(cert_res['_id']): {'java_keystores':
                                                                                                                                                                                                                  ["keystore_ws"], 'ca_root_certs': [{'name': "cert_ws",
                                                                                                                                                                                                                      'uri': "uri_ws"}]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 5352..5354

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 41.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              ou_1['policies'] = {text_type(package_res_policy['_id']): {
                                                                                                                                                                                                                  'package_list': [
                                                                                                                                                                                                                      {'name': 'gimp', 'version': 'latest', 'action': 'add'}]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 3977..3979
                                                                                                                                                                                                      gecoscc/tests.py on lines 6309..6311

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 39.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              domain_1['policies'] = {text_type(package_res_policy['_id']): {
                                                                                                                                                                                                                  'package_list': [
                                                                                                                                                                                                                      {'name': 'libreoffice', 'version': 'latest', 'action': 'add'}]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 3964..3966
                                                                                                                                                                                                      gecoscc/tests.py on lines 6309..6311

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 39.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              ou_1['policies'] = {text_type(package_res_policy['_id']): {
                                                                                                                                                                                                                  'package_list': [
                                                                                                                                                                                                                      {'name': 'gimp', 'version': 'latest', 'action': 'add'}]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 3964..3966
                                                                                                                                                                                                      gecoscc/tests.py on lines 3977..3979

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 39.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              computer['policies'] = { str(policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [ new_printer['_id'] ]
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              group['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_repository['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              user['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_storage['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              ou_1['policies'] = {text_type(repository_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_repo2['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              group['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_repository_ou['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              computer['policies'] = {text_type(repository_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_repository['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              ou_1['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_storage_2['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              group['policies'] = {text_type(printer_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_printer['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              user['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [storage['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              computer['policies'] = {text_type(printer_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_printer['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              group['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_storage_ou['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              computer['policies'] = {text_type(repository_policy['_id']): 
                                                                                                                                                                                                                                      {'object_related_list': [new_repo1['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              ou_1['policies'] = {text_type(printer_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_printer_2['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              group['policies'] = {text_type(printer_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_printer_ou['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              ou_1['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [storage_ou_1['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              group['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_storage['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              user['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_storage['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              ou_1['policies'] = {text_type(storage_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_repository_ou_2['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5746..5747
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 19 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              computer['policies'] = {text_type(printer_policy['_id']): {
                                                                                                                                                                                                                  'object_related_list': [new_printer['_id']]}}
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 18 other locations - About 55 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 2636..2637
                                                                                                                                                                                                      gecoscc/tests.py on lines 2881..2882
                                                                                                                                                                                                      gecoscc/tests.py on lines 2908..2909
                                                                                                                                                                                                      gecoscc/tests.py on lines 2966..2967
                                                                                                                                                                                                      gecoscc/tests.py on lines 2994..2995
                                                                                                                                                                                                      gecoscc/tests.py on lines 4203..4204
                                                                                                                                                                                                      gecoscc/tests.py on lines 4216..4217
                                                                                                                                                                                                      gecoscc/tests.py on lines 4293..4294
                                                                                                                                                                                                      gecoscc/tests.py on lines 4306..4307
                                                                                                                                                                                                      gecoscc/tests.py on lines 4381..4382
                                                                                                                                                                                                      gecoscc/tests.py on lines 4393..4394
                                                                                                                                                                                                      gecoscc/tests.py on lines 4406..4407
                                                                                                                                                                                                      gecoscc/tests.py on lines 5282..5283
                                                                                                                                                                                                      gecoscc/tests.py on lines 5290..5291
                                                                                                                                                                                                      gecoscc/tests.py on lines 5849..5850
                                                                                                                                                                                                      gecoscc/tests.py on lines 5933..5934
                                                                                                                                                                                                      gecoscc/tests.py on lines 6291..6292
                                                                                                                                                                                                      gecoscc/tests.py on lines 6300..6301

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 37.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          jobs_pagesize = colander.SchemaNode(colander.Integer(),
                                                                                                                                                                                                                                        default=30,
                                                                                                                                                                                                                                        missing=30,
                                                                                                                                                                                                                                        title='Actions list page size:',
                                                                                                                                                                                                                                        validator=colander.Range(1, 200))
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 3 other locations - About 45 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 619..623
                                                                                                                                                                                                      gecoscc/tests.py on lines 624..628
                                                                                                                                                                                                      gecoscc/tests.py on lines 634..638

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 35.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              if node['memberof'] != []:
                                                                                                                                                                                                                  id_grupo = node['memberof']
                                                                                                                                                                                                                  node['memberof'] = [ObjectId(id_grupo[0])]
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 45 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1265..1267

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 35.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          nav_tree_pagesize = colander.SchemaNode(colander.Integer(),
                                                                                                                                                                                                                                        default=10,
                                                                                                                                                                                                                                        missing=10,
                                                                                                                                                                                                                                        title='Navigation tree page size:',
                                                                                                                                                                                                                                        validator=colander.Range(1, 200))
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 3 other locations - About 45 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 624..628
                                                                                                                                                                                                      gecoscc/tests.py on lines 629..633
                                                                                                                                                                                                      gecoscc/tests.py on lines 634..638

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 35.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          policies_pagesize = colander.SchemaNode(colander.Integer(),
                                                                                                                                                                                                                                        default=8,
                                                                                                                                                                                                                                        missing=8,
                                                                                                                                                                                                                                        title='Policies list page size:',
                                                                                                                                                                                                                                        validator=colander.Range(1, 200))
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 3 other locations - About 45 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 619..623
                                                                                                                                                                                                      gecoscc/tests.py on lines 629..633
                                                                                                                                                                                                      gecoscc/tests.py on lines 634..638

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 35.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                          group_nodes_pagesize = colander.SchemaNode(colander.Integer(),
                                                                                                                                                                                                                                        default=10,
                                                                                                                                                                                                                                        missing=10,
                                                                                                                                                                                                                                        title='Group nodes list page size:',
                                                                                                                                                                                                                                        validator=colander.Range(1, 200))
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 3 other locations - About 45 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 619..623
                                                                                                                                                                                                      gecoscc/tests.py on lines 624..628
                                                                                                                                                                                                      gecoscc/tests.py on lines 629..633

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 35.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              if node['type'] == 'user':
                                                                                                                                                                                                                  id_computer = node['computers']
                                                                                                                                                                                                                  node['computers'] = [ObjectId(id_computer[0])]
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in gecoscc/tests.py and 1 other location - About 45 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 1268..1270

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 35.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                  with open('gecoscc/test_resources/node_default.json') as file:
                                                                                                                                                                                                                      node_default_json = file.read().replace(
                                                                                                                                                                                                                          '%(chef_url)s', CHEF_URL).replace(
                                                                                                                                                                                                                              '%s(node_name)s', CHEF_NODE_ID)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 3 other locations - About 35 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 238..241
                                                                                                                                                                                                      gecoscc/tests.py on lines 426..429
                                                                                                                                                                                                      gecoscc/tests.py on lines 440..443

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 33.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                  with open('gecoscc/test_resources/node_attributes.json') as file:
                                                                                                                                                                                                                      node_attributes_json = file.read().replace(
                                                                                                                                                                                                                          '%(chef_url)s', CHEF_URL).replace(
                                                                                                                                                                                                                              '%s(node_name)s', CHEF_NODE_ID)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 3 other locations - About 35 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 232..235
                                                                                                                                                                                                      gecoscc/tests.py on lines 426..429
                                                                                                                                                                                                      gecoscc/tests.py on lines 440..443

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 33.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              with open('gecoscc/test_resources/node_default.json') as file:
                                                                                                                                                                                                                  node_default_json = file.read().replace(
                                                                                                                                                                                                                      '%(chef_url)s', CHEF_URL).replace(
                                                                                                                                                                                                                          '%s(node_name)s', chef_node_id)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 3 other locations - About 35 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 232..235
                                                                                                                                                                                                      gecoscc/tests.py on lines 238..241
                                                                                                                                                                                                      gecoscc/tests.py on lines 440..443

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 33.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                  with open('gecoscc/test_resources/node_attributes.json') as file:
                                                                                                                                                                                                                      node_attributes_json = file.read().replace(
                                                                                                                                                                                                                          '%(chef_url)s', CHEF_URL).replace(
                                                                                                                                                                                                                              '%s(node_name)s', chef_node_id)
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in gecoscc/tests.py and 3 other locations - About 35 mins to fix
                                                                                                                                                                                                      gecoscc/tests.py on lines 232..235
                                                                                                                                                                                                      gecoscc/tests.py on lines 238..241
                                                                                                                                                                                                      gecoscc/tests.py on lines 426..429

                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                      This issue has a mass of 33.

                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                      There are no issues that match your filters.

                                                                                                                                                                                                      Category
                                                                                                                                                                                                      Status