intracom-telecom-sdn/nstat

View on GitHub
util/unittests/test_html.py

Summary

Maintainability
C
1 day
Test Coverage

Showing 8 of 8 total issues

File test_html.py has 338 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright (c) 2015 Intracom S.A. Telecom Solutions. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v1.0 which accompanies this distribution,
# and is available at http://www.eclipse.org/legal/epl-v10.html
Severity: Minor
Found in util/unittests/test_html.py - About 4 hrs to fix

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

    def test_multy_dict_to_html_01(self):
    """Tests the multy_dict_to_html() method of util/html.py.
    It checks the equality of the result of an input.
    - In this test case we are using only the compulsory arguments of the
    method
    Severity: Major
    Found in util/unittests/test_html.py and 1 other location - About 1 hr to fix
    util/unittests/test_html.py on lines 205..214

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

    def test_multy_dict_to_html_02(self):
    """Tests the multy_dict_to_html() method of util/html.py.
    It checks the equality of the result of an input. In this test case we
    are using only the compulsory arguments of the method
    """
    Severity: Major
    Found in util/unittests/test_html.py and 1 other location - About 1 hr to fix
    util/unittests/test_html.py on lines 192..202

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

    def test_singledicttabledata_02(self):
    """
    Method that tests single_dict_table_data() when data_values parameter
    is a List of Dictionaries.
    """
    Severity: Major
    Found in util/unittests/test_html.py and 1 other location - About 1 hr to fix
    util/unittests/test_html.py on lines 335..345

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

    def test_singledicttabledata_01(self):
    """
    Method that tests single_dict_table_data() when data_values parameter
    is a string value.
    """
    Severity: Major
    Found in util/unittests/test_html.py and 1 other location - About 1 hr to fix
    util/unittests/test_html.py on lines 348..358

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

    def test_single_dict_to_html(self):
    """
    Method that tests the single_dict_to_html() method of util/html.py
    It checks the equality of the result of an input.
    - In this test case we are testing all the features of the method
    Severity: Major
    Found in util/unittests/test_html.py and 4 other locations - About 30 mins to fix
    util/unittests/test_html.py on lines 26..34
    util/unittests/test_html.py on lines 65..73
    util/unittests/test_process.py on lines 108..116
    util/unittests/test_stats.py on lines 31..37

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

    def test_generate_html_head(self):
    """Checks the generate_html_headl() method of util/html.py.
    It checks the equality of the result of an input.
    """
     
    Severity: Major
    Found in util/unittests/test_html.py and 4 other locations - About 30 mins to fix
    util/unittests/test_html.py on lines 26..34
    util/unittests/test_html.py on lines 251..261
    util/unittests/test_process.py on lines 108..116
    util/unittests/test_stats.py on lines 31..37

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

    def test_generate_html_foot(self):
    """Checks the generate_html_footl() method of util/html.py.
    It checks the equality of the result of an input.
    """
     
    Severity: Major
    Found in util/unittests/test_html.py and 4 other locations - About 30 mins to fix
    util/unittests/test_html.py on lines 65..73
    util/unittests/test_html.py on lines 251..261
    util/unittests/test_process.py on lines 108..116
    util/unittests/test_stats.py on lines 31..37

    There are no issues that match your filters.

    Category
    Status