swimlane/swimlane-python

View on GitHub
functional_tests/driver_tests/test_users_groups_adaptor.py

Summary

Maintainability
F
1 wk
Test Coverage

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

    def test_groups_list(helpers):
        swimGroups = pytest.swimlane_instance.groups.list()
        groupsList = list(swimGroups)
        groupsList2 = [str(x) for x in swimGroups]
        assert "Everyone" in groupsList2
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 4 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 16..22

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

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_users_list(helpers):
        swimUsers = pytest.swimlane_instance.users.list()
        usersList = list(swimUsers)
        usersList2 = [str(x) for x in swimUsers]
        assert "admin" in usersList2
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 4 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 105..111

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

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_groups_get_invalid_param(helpers):
        with pytest.raises(TypeError) as excinfo:
            pytest.swimlane_instance.groups.get(garbage=pytest.tempGroup['id'])
        assert str(excinfo.value) == "Unexpected arguments: {{'garbage': {}}}".format(
            pytest.py_ver_uni_str(pytest.tempGroup['id']))
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 4 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 97..101

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

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_users_get_invalid_param(helpers):
        with pytest.raises(TypeError) as excinfo:
            pytest.swimlane_instance.users.get(garbage=pytest.tempUser['id'])
        assert str(excinfo.value) == "Unexpected arguments: {{'garbage': {}}}".format(
            pytest.py_ver_uni_str(pytest.tempUser['id']))
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 4 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 184..188

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

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

    @pytest.mark.xfail(reason="SPT-6030: Testing for name as empty string does error out")
    def test_groups_get_by_empty_name(helpers):
        emptyName = ""
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.groups.get(name=emptyName)
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 5 other locations - About 3 hrs to fix
functional_tests/driver_tests/test_apps_adaptor.py on lines 35..40
functional_tests/driver_tests/test_apps_adaptor.py on lines 42..47
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 51..56
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 77..83
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 136..141

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

    @pytest.mark.xfail(reason="SPT-6030: Testing for display_Name as an empty string should fail")
    def test_users_get_by_empty_display_name(helpers):
        emptyDisplayName = ""
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.users.get(display_name=emptyDisplayName)
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 5 other locations - About 3 hrs to fix
functional_tests/driver_tests/test_apps_adaptor.py on lines 35..40
functional_tests/driver_tests/test_apps_adaptor.py on lines 42..47
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 51..56
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 136..141
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 162..168

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

    @pytest.mark.xfail(reason="SPT-6030: Testing for display_Name as None givesValueError: Unable to find user with ID \"None\"")
    def test_users_get_by_null_id(helpers):
        noneID = None
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.users.get(id=noneID)
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 2 other locations - About 3 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 143..148
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 170..176

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

    @pytest.mark.xfail(reason="SPT-6030: Testing for randomID as empty does not give formal response (attributeError)")
    def test_groups_get_by_empty_id(helpers):
        emptyID = ''
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.groups.get(id=emptyID)
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 5 other locations - About 3 hrs to fix
functional_tests/driver_tests/test_apps_adaptor.py on lines 35..40
functional_tests/driver_tests/test_apps_adaptor.py on lines 42..47
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 51..56
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 77..83
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 162..168

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

    @pytest.mark.xfail(reason="SPT-6030: Testing for Name as None gives  TypeError: argument of type 'NoneType' is not iterable")
    def test_groups_get_by_null_name(helpers):
        noneName = None
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.groups.get(name=noneName)
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 2 other locations - About 3 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 58..63
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 143..148

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

    @pytest.mark.xfail(reason="SPT-6030: Testing for randomID as empty does not give formal response (attributeError)")
    def test_users_get_by_empty_id(helpers):
        emptyID = ''
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.users.get(id=emptyID)
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 5 other locations - About 3 hrs to fix
functional_tests/driver_tests/test_apps_adaptor.py on lines 35..40
functional_tests/driver_tests/test_apps_adaptor.py on lines 42..47
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 77..83
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 136..141
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 162..168

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

    @pytest.mark.xfail(reason="SPT-6030: Testing for ID as None givesValueError: Unable to find group with ID \"None\"")
    def test_groups_get_by_null_id(helpers):
        noneID = None
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.groups.get(id=noneID)
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 2 other locations - About 3 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 58..63
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 170..176

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

    def test_users_get_by_invalid_id(helpers):
        randomID = '123adv12312'
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.users.get(id=randomID)
        assert str(excinfo.value) == 'Unable to find user with ID "%s"' % randomID
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 2 other locations - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 70..75
functional_tests/driver_tests/test_users_groups_adaptor.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 59.

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_users_get_by_invalid_display_name(helpers):
        randomDisplayName = "really random display name"
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.users.get(display_name=randomDisplayName)
        assert str(
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 2 other locations - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 45..49
functional_tests/driver_tests/test_users_groups_adaptor.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 59.

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_groups_get_by_invalid_name(helpers):
        randomName = "really random group name"
        with pytest.raises(ValueError) as excinfo:
            pytest.swimlane_instance.groups.get(name=randomName)
        assert str(
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 2 other locations - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 45..49
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 70..75

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

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_users_get_by_display_name(helpers):
        swimUser = pytest.swimlane_instance.users.get(
            display_name=pytest.tempUser['displayName'])
        assert swimUser.for_json()["id"] == pytest.tempUser['id']
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 3 other locations - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 41..43
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 131..134
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 150..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 58.

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_users_get_by_id(helpers):
        swimUser = pytest.swimlane_instance.users.get(id=pytest.tempUser['id'])
        assert swimUser.for_json()["name"] == pytest.tempUser['userName']
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 3 other locations - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 65..68
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 131..134
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 150..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 58.

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_groups_get_by_name(helpers):
        swimGroup = pytest.swimlane_instance.groups.get(
            name=pytest.tempGroup['name'])
        assert swimGroup.for_json()["id"] == pytest.tempGroup['id']
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 3 other locations - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 41..43
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 65..68
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 131..134

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

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_grouprs_get_by_id(helpers):
        swimGroup = pytest.swimlane_instance.groups.get(
            id=pytest.tempGroup['id'])
        assert swimGroup.for_json()["name"] == pytest.tempGroup['name']
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 3 other locations - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 41..43
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 65..68
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 150..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 58.

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-6031: Sending a floating point for the max count should throw an error.")
    def test_groups_list_count_limit_not_valid_float(helpers):
        floatMaxGroups = 1.75
        swimGroups = pytest.swimlane_instance.users.list(limit=floatMaxGroups)
        assert len(swimGroups) == floatMaxGroups
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 35..39

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

    @pytest.mark.xfail(reason="SPT-6031: Sending a string for the max count should throw an error.")
    def test_users_list_count_limit_not_valid_string(helpers):
        invalidMaxUsers = 'Hello'
        swimUsers = pytest.swimlane_instance.users.list(limit=invalidMaxUsers)
        assert len(swimUsers) == invalidMaxUsers
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 118..123

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

    @pytest.mark.xfail(reason="SPT-6031: Sending a string for the max count should throw an error.")
    def test_groups_list_count_limit_not_valid_string(helpers):
        invalidMaxGroups = 'Hello'
        swimGroups = pytest.swimlane_instance.users.list(
            limit=invalidMaxGroups)
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 29..33

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

    @pytest.mark.xfail(reason="SPT-6031: Sending a floating point for the max count should throw an error.")
    def test_users_list_count_limit_not_valid_float(helpers):
        floatMaxUsers = 1.75
        swimUsers = pytest.swimlane_instance.users.list(limit=floatMaxUsers)
        assert len(swimUsers) == floatMaxUsers
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 2 hrs to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 125..129

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

    def test_users_get_no_params(helpers):
        with pytest.raises(TypeError) as excinfo:
            pytest.swimlane_instance.users.get()
        assert str(
            excinfo.value) == 'Must provide one of id, display_name as keyword argument'
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 2 other locations - About 1 hr to fix
functional_tests/driver_tests/test_records_adaptor.py on lines 73..77
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 178..182

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

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_groups_get_no_params(helpers):
        with pytest.raises(TypeError) as excinfo:
            pytest.swimlane_instance.groups.get()
        assert str(
            excinfo.value) == 'Must provide one of id, name as keyword argument'
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 2 other locations - About 1 hr to fix
functional_tests/driver_tests/test_records_adaptor.py on lines 73..77
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 91..95

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

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_users_list_count_limit(helpers):
        maxUsers = 1
        swimUsers = pytest.swimlane_instance.users.list(limit=maxUsers)
        assert len(swimUsers) == maxUsers
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 1 hr to fix
functional_tests/driver_tests/test_users_groups_adaptor.py on lines 113..116

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

    def test_groups_list_count_limit(helpers):
        maxGroups = 1
        swimGroups = pytest.swimlane_instance.groups.list(limit=maxGroups)
        assert len(swimGroups) == maxGroups
Severity: Major
Found in functional_tests/driver_tests/test_users_groups_adaptor.py and 1 other location - About 1 hr to fix
functional_tests/driver_tests/test_users_groups_adaptor.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 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

There are no issues that match your filters.

Category
Status