swimlane/swimlane-python

View on GitHub
functional_tests/driver_tests/test_text_fields.py

Summary

Maintainability
F
1 mo
Test Coverage

File test_text_fields.py has 571 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import pytest
from swimlane import exceptions

# Not testing the followig field sub-types, because of no format limitations:
# - Telephone
Severity: Major
Found in functional_tests/driver_tests/test_text_fields.py - About 1 day to fix

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

    class TestMinMaxCharCountTextField:
        def test_min_max_char_count_exact_min(helpers):
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "Min Max Chars Text": "abcde"})
            assert theRecord["Min Max Chars Text"] == "abcde"
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 5 days to fix
    functional_tests/driver_tests/test_text_fields.py on lines 546..602

    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 577.

    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

    class TestMinMaxWordCountTextField:
        def test_min_max_word_count_exact_min(helpers):
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "Min Max Words Text": "hello there how"})
            assert theRecord["Min Max Words Text"] == "hello there how"
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 5 days to fix
    functional_tests/driver_tests/test_text_fields.py on lines 416..472

    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 577.

    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

    class TestMinWordCountTextField:
        def test_min_word_count_exact(helpers):
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "Min Words Text": "hello there how"})
            assert theRecord["Min Words Text"] == "hello there how"
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 3 days to fix
    functional_tests/driver_tests/test_text_fields.py on lines 345..378
    functional_tests/driver_tests/test_text_fields.py on lines 381..413
    functional_tests/driver_tests/test_text_fields.py on lines 511..543

    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 332.

    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

    class TestMaxCharCountTextField:
        def test_max_char_count_exact(helpers):
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "Max Chars Text": "abcdefghij"})
            assert theRecord["Max Chars Text"] == "abcdefghij"
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 3 days to fix
    functional_tests/driver_tests/test_text_fields.py on lines 345..378
    functional_tests/driver_tests/test_text_fields.py on lines 475..508
    functional_tests/driver_tests/test_text_fields.py on lines 511..543

    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 332.

    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

    class TestMaxWordCountTextField:
        def test_max_word_count_exact(helpers):
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "Max Words Text": "hello there friend how are you doing on this fine"})
            assert theRecord["Max Words Text"] == "hello there friend how are you doing on this fine"
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 3 days to fix
    functional_tests/driver_tests/test_text_fields.py on lines 345..378
    functional_tests/driver_tests/test_text_fields.py on lines 381..413
    functional_tests/driver_tests/test_text_fields.py on lines 475..508

    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 332.

    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

    class TestMinCharCountTextField:
        def test_min_char_count_exact(helpers):
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "Min Chars Text": "abcde"})
            assert theRecord["Min Chars Text"] == "abcde"
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 3 days to fix
    functional_tests/driver_tests/test_text_fields.py on lines 381..413
    functional_tests/driver_tests/test_text_fields.py on lines 475..508
    functional_tests/driver_tests/test_text_fields.py on lines 511..543

    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 332.

    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 test_comment_rich_text_false_on_save_exact(helpers):
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            commentText = pytest.fake.sentence()
            comments = theRecord["Comments"]
            comments.comment(commentText, rich_text=False)
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 1 day to fix
    functional_tests/driver_tests/test_text_fields.py on lines 666..674

    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 132.

    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 test_comment_rich_text_on_save_exact(helpers):
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            commentText = pytest.fake.sentence()
            comments = theRecord["Comments"]
            comments.comment(commentText, rich_text=True)
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 1 day to fix
    functional_tests/driver_tests/test_text_fields.py on lines 676..684

    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 132.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an URL, but does not fail.")
        def test_url_text_field_on_save_bad_value(helpers):
            textValue = pytest.fake.word()
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['URL'] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 3 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 92..97
    functional_tests/driver_tests/test_text_fields.py on lines 228..233

    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 66.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an IP, but does not fail.")
        def test_ip_text_field_on_save_bad_value(helpers):
            textValue = pytest.fake.word()
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['IP'] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 3 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 92..97
    functional_tests/driver_tests/test_text_fields.py on lines 148..153

    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 66.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an email, but does not fail.")
        def test_email_text_field_on_save_bad_value(helpers):
            textValue = pytest.fake.word()
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord["Email"] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 3 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 148..153
    functional_tests/driver_tests/test_text_fields.py on lines 228..233

    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 66.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an email, but does not fail.")
        def test_email_text_field_bad_value(helpers):
            textValue = pytest.fake.word()
            # This should throw an exception that the valus is not proper email format.
            theRecord = pytest.app.records.create(
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 3 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 221..226

    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 65.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an IP, but does not fail.")
        def test_ip_text_field_bad_value(helpers):
            textValue = pytest.fake.word()
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "IP": textValue})
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 3 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 84..90

    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 65.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an URL, but does not fail.")
        def test_url_text_field_on_save_bad_value_type_object(helpers):
            textValue = {"url": "http://foo.com"}
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['URL'] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 3 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 99..104
    functional_tests/driver_tests/test_text_fields.py on lines 242..247

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an email, but does not fail.")
        def test_email_text_field_on_save_bad_type_object(helpers):
            textValue = {"email": "foo@work.com"}
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord["Email"] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 3 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 162..167
    functional_tests/driver_tests/test_text_fields.py on lines 242..247

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an IP, but does not fail.")
        def test_ip_text_field_on_save_bad_value_type_object(helpers):
            textValue = {"ip": "192.168.0.1"}
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['IP'] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 3 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 99..104
    functional_tests/driver_tests/test_text_fields.py on lines 162..167

    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

        def test_required_field_not_set(helpers):
            with pytest.raises(exceptions.ValidationError) as excinfo:
                pytest.app.records.create(**{"Text": "some text"})
            assert str(excinfo.value) == 'Validation failed for <Record: %s - New>. Reason: Required field "Required Text" is not set' % pytest.app.acronym
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 3 hrs to fix
    functional_tests/driver_tests/test_selection_fields.py on lines 24..27

    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 62.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an URL, but does not fail.")
        def test_url_text_field_on_save_bad_value_type_number(helpers):
            textValue = 123
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['URL'] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 113..118
    functional_tests/driver_tests/test_text_fields.py on lines 256..261

    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 60.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an email, but does not fail.")
        def test_email_text_field_on_save_bad_value_type_numeric(helpers):
            textValue = 123
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord["Email"] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 176..181
    functional_tests/driver_tests/test_text_fields.py on lines 256..261

    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 60.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an IP, but does not fail.")
        def test_ip_text_field_on_save_bad_value_type_number(helpers):
            textValue = 123
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['IP'] = textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 113..118
    functional_tests/driver_tests/test_text_fields.py on lines 176..181

    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 60.

    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

        def test_ip_text_field_on_save_v6(helpers):
            textValue = pytest.fake.ipv6()
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['IP'] = textValue
            theRecord.save()
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 78..82
    functional_tests/driver_tests/test_text_fields.py on lines 135..139
    functional_tests/driver_tests/test_text_fields.py on lines 191..195

    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 54.

    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

        def test_ip_text_field_on_save_v4(helpers):
            textValue = pytest.fake.ipv4()
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['IP'] = textValue
            theRecord.save()
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 78..82
    functional_tests/driver_tests/test_text_fields.py on lines 135..139
    functional_tests/driver_tests/test_text_fields.py on lines 203..207

    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 54.

    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

        def test_email_text_field_on_save(helpers):
            textValue = pytest.fake.email()
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord["Email"] = textValue
            theRecord.save()
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 135..139
    functional_tests/driver_tests/test_text_fields.py on lines 191..195
    functional_tests/driver_tests/test_text_fields.py on lines 203..207

    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 54.

    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

        def test_url_text_field_on_save(helpers):
            textValue = pytest.fake.url()
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            theRecord['URL'] = textValue
            theRecord.save()
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 78..82
    functional_tests/driver_tests/test_text_fields.py on lines 191..195
    functional_tests/driver_tests/test_text_fields.py on lines 203..207

    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 54.

    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

        def test_email_text_field(helpers):
            textValue = pytest.fake.email()
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "Email": textValue})
            assert theRecord["Email"] == textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 129..133
    functional_tests/driver_tests/test_text_fields.py on lines 185..189
    functional_tests/driver_tests/test_text_fields.py on lines 197..201

    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 4 locations. Consider refactoring.
    Open

        def test_url_text_field(helpers):
            textValue = pytest.fake.url()
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "URL": textValue})
            assert theRecord["URL"] == textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 72..76
    functional_tests/driver_tests/test_text_fields.py on lines 185..189
    functional_tests/driver_tests/test_text_fields.py on lines 197..201

    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 4 locations. Consider refactoring.
    Open

        def test_ip_text_field_v4(helpers):
            textValue = pytest.fake.ipv4()
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "IP": textValue})
            assert theRecord["IP"] == textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 72..76
    functional_tests/driver_tests/test_text_fields.py on lines 129..133
    functional_tests/driver_tests/test_text_fields.py on lines 197..201

    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 4 locations. Consider refactoring.
    Open

        def test_ip_text_field_v6(helpers):
            textValue = pytest.fake.ipv6()
            theRecord = pytest.app.records.create(
                **{"Required Text": "required", "IP": textValue})
            assert theRecord["IP"] == textValue
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 3 other locations - About 2 hrs to fix
    functional_tests/driver_tests/test_text_fields.py on lines 72..76
    functional_tests/driver_tests/test_text_fields.py on lines 129..133
    functional_tests/driver_tests/test_text_fields.py on lines 185..189

    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 3 locations. Consider refactoring.
    Open

        @pytest.mark.xfail(reason="SPT-6360: This is not an email, but does not fail.")
        def test_email_text_field_bad_value_type_object(helpers):
            textValue = {"email": "foo@work.com"}
            # this should be throwing an exception based on the value not being a proper email.
            pytest.app.records.create(
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 1 hr to fix
    functional_tests/driver_tests/test_text_fields.py on lines 155..160
    functional_tests/driver_tests/test_text_fields.py on lines 235..240

    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 46.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an URL, but does not fail.")
        def test_url_text_field_bad_value_type_object(helpers):
            textValue = {"url": "http://foo.com"}
            # this should be throwing an exception based on the value not being a proper URL.
            pytest.app.records.create(
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 1 hr to fix
    functional_tests/driver_tests/test_text_fields.py on lines 106..111
    functional_tests/driver_tests/test_text_fields.py on lines 235..240

    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 46.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an IP, but does not fail.")
        def test_ip_text_field_bad_value_type_object(helpers):
            textValue = {"ip": "192.168.0.1"}
            # This should throw an exception since the value is not a proper IP
            pytest.app.records.create(
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 1 hr to fix
    functional_tests/driver_tests/test_text_fields.py on lines 106..111
    functional_tests/driver_tests/test_text_fields.py on lines 155..160

    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 46.

    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 2 locations. Consider refactoring.
    Open

            assert str(excinfo.value) == "Validation failed for <Record: {}>. Reason: Text list field items must be strings, not '<{} 'int'>'".format(
                theRecord.tracking_id, ("class", "type")[pytest.helpers.py_ver() == 2])
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 1 hr to fix
    functional_tests/driver_tests/test_text_fields.py on lines 321..322

    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 45.

    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 2 locations. Consider refactoring.
    Open

            assert str(excinfo.value) == "Validation failed for <Record: {}>. Reason: Text list field items must be strings, not '<{} 'int'>'".format(
                theRecord.tracking_id, ("class", "type")[pytest.helpers.py_ver() == 2])
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 1 other location - About 1 hr to fix
    functional_tests/driver_tests/test_text_fields.py on lines 341..342

    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 45.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an IP, but does not fail.")
        def test_ip_text_field_bad_value_type_number(helpers):
            textValue = 123
            # This should throw an exception since the value is not a proper IP
            pytest.app.records.create(
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 1 hr to fix
    functional_tests/driver_tests/test_text_fields.py on lines 120..125
    functional_tests/driver_tests/test_text_fields.py on lines 169..174

    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 42.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an URL, but does not fail.")
        def test_url_text_field_bad_value_type_number(helpers):
            textValue = 123
            # this should be throwing an exception based on the value not being a proper URL.
            pytest.app.records.create(
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 1 hr to fix
    functional_tests/driver_tests/test_text_fields.py on lines 120..125
    functional_tests/driver_tests/test_text_fields.py on lines 249..254

    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 42.

    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

        @pytest.mark.xfail(reason="SPT-6360: This is not an email, but does not fail.")
        def test_email_text_field_bad_value_type_numeric(helpers):
            textValue = 123
            # this should be throwing an exception based on the value not being a proper email.
            pytest.app.records.create(
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 1 hr to fix
    functional_tests/driver_tests/test_text_fields.py on lines 169..174
    functional_tests/driver_tests/test_text_fields.py on lines 249..254

    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 42.

    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

        def test_required_field(helpers):
            theRecord = pytest.app.records.create(**{"Required Text": "required"})
            assert theRecord["Required Text"] == "required"
    Severity: Major
    Found in functional_tests/driver_tests/test_text_fields.py and 2 other locations - About 1 hr to fix
    functional_tests/driver_tests/test_selection_fields.py on lines 19..22
    functional_tests/driver_tests/test_selection_fields.py on lines 207..210

    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 40.

    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