eventoL/eventoL

View on GitHub
eventol/manager/tests/conftest.py

Summary

Maintainability
D
2 days
Test Coverage

File conftest.py has 260 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# pylint: redefined-outer-name
# pylint: disable=too-many-arguments

from datetime import datetime
from django.db import connection
Severity: Minor
Found in eventol/manager/tests/conftest.py - About 2 hrs to fix

    Function event_data1 has 13 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def event_data1(
    Severity: Major
    Found in eventol/manager/tests/conftest.py - About 1 hr to fix

      Function event_data2 has 13 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def event_data2(
      Severity: Major
      Found in eventol/manager/tests/conftest.py - About 1 hr to fix

        Redefining name 'event_user1' from outer scope (line 99)
        Open

        def collaborator1(event_user1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'user1' from outer scope (line 76)
        Open

        def event_user1(user1, event1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event1' from outer scope (line 57)
        Open

        def attendee_without_user1(event1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_user2' from outer scope (line 107)
        Open

        def reviewer2(event_user2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'attendee_from_event_user2' from outer scope (line 141)
        Open

                attendee_from_event_user2, organizer2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'reviewer2' from outer scope (line 199)
        Open

                collaborator2, installer2, reviewer2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'user1' from outer scope (line 76)
        Open

                event_tag_1, event1, user1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'installation2' from outer scope (line 241)
        Open

                activity2, room2, installation2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Unable to import 'pytest'
        Open

        import pytest
        Severity: Critical
        Found in eventol/manager/tests/conftest.py by pylint

        Used when pylint has been unable to import a module.

        Redefining name 'event_user2' from outer scope (line 107)
        Open

        def organizer2(event_user2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event1' from outer scope (line 57)
        Open

        def activity1(event1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event2' from outer scope (line 66)
        Open

        def activity2(event2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'installer1' from outer scope (line 180)
        Open

        def installation1(attendee_from_event_user1, installer1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'attendee_without_user1' from outer scope (line 116)
        Open

                event_user1, attendee_without_user1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'reviewer1' from outer scope (line 193)
        Open

                collaborator1, installer1, reviewer1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'collaborator2' from outer scope (line 173)
        Open

                collaborator2, installer2, reviewer2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'activity2' from outer scope (line 212)
        Open

                activity2, room2, installation2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event1' from outer scope (line 57)
        Open

        def attendee_from_event_user1(event_user1, event1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_user2' from outer scope (line 107)
        Open

        def collaborator2(event_user2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'activity1' from outer scope (line 206)
        Open

                activity1, room1, installation1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'attendee_without_user2' from outer scope (line 122)
        Open

                event_user2, attendee_without_user2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'organizer2' from outer scope (line 160)
        Open

                attendee_from_event_user2, organizer2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'room2' from outer scope (line 225)
        Open

                activity2, room2, installation2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Unable to import 'autofixture'
        Open

        import autofixture
        Severity: Critical
        Found in eventol/manager/tests/conftest.py by pylint

        Used when pylint has been unable to import a module.

        Redefining name 'event_user2' from outer scope (line 107)
        Open

        def attendee_from_event_user2(event_user2, event2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_user1' from outer scope (line 99)
        Open

        def installer1(event_user1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Unable to import 'rest_framework.test'
        Open

        from rest_framework.test import APIClient, APIRequestFactory
        Severity: Critical
        Found in eventol/manager/tests/conftest.py by pylint

        Used when pylint has been unable to import a module.

        Redefining name 'organizer1' from outer scope (line 154)
        Open

                attendee_from_event_user1, organizer1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event2' from outer scope (line 66)
        Open

        def attendee_without_user2(event2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_user1' from outer scope (line 99)
        Open

        def attendee_from_event_user1(event_user1, event1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_user1' from outer scope (line 99)
        Open

        def reviewer1(event_user1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'room1' from outer scope (line 219)
        Open

                activity1, room1, installation1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'installation1' from outer scope (line 232)
        Open

                activity1, room1, installation1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_tag_2' from outer scope (line 47)
        Open

                event_tag_2, event2, user2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'attendee_from_event_user1' from outer scope (line 129)
        Open

                attendee_from_event_user1, organizer1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'user2' from outer scope (line 87)
        Open

                event_tag_2, event2, user2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'installer2' from outer scope (line 186)
        Open

                collaborator2, installer2, reviewer2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event2' from outer scope (line 66)
        Open

        def attendee_from_event_user2(event_user2, event2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_user2' from outer scope (line 107)
        Open

        def installer2(event_user2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event2' from outer scope (line 66)
        Open

        def event_user2(user2, event2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'attendee_from_event_user2' from outer scope (line 141)
        Open

        def installation2(attendee_from_event_user2, installer2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_tag_2' from outer scope (line 47)
        Open

        def event2(event_tag_2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event1' from outer scope (line 57)
        Open

        def event_user1(user1, event1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event1' from outer scope (line 57)
        Open

        def room1(event1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'attendee_from_event_user1' from outer scope (line 129)
        Open

        def installation1(attendee_from_event_user1, installer1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_user2' from outer scope (line 107)
        Open

                event_user2, attendee_without_user2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'user2' from outer scope (line 87)
        Open

        def event_user2(user2, event2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Unused connection imported from django.db
        Open

        from django.db import connection
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when an imported module or variable is not used.

        Redefining name 'event_user1' from outer scope (line 99)
        Open

                event_user1, attendee_without_user1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'collaborator1' from outer scope (line 167)
        Open

                collaborator1, installer1, reviewer1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_tag_1' from outer scope (line 38)
        Open

        def event1(event_tag_1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_user1' from outer scope (line 99)
        Open

        def organizer1(event_user1):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event2' from outer scope (line 66)
        Open

        def room2(event2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event1' from outer scope (line 57)
        Open

                event_tag_1, event1, user1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event2' from outer scope (line 66)
        Open

                event_tag_2, event2, user2,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'installer2' from outer scope (line 186)
        Open

        def installation2(attendee_from_event_user2, installer2):
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'event_tag_1' from outer scope (line 38)
        Open

                event_tag_1, event1, user1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

        Redefining name 'installer1' from outer scope (line 180)
        Open

                collaborator1, installer1, reviewer1,
        Severity: Minor
        Found in eventol/manager/tests/conftest.py by pylint

        Used when a variable's name hides a name defined in the outer scope.

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

        @pytest.fixture
        @pytest.mark.django_db
        def event_data2(
                event_tag_2, event2, user2,
                event_user2, attendee_without_user2,
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 1 other location - About 2 hrs to fix
        eventol/manager/tests/conftest.py on lines 298..319

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

        @pytest.fixture
        @pytest.mark.django_db
        def event_data1(
                event_tag_1, event1, user1,
                event_user1, attendee_without_user1,
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 1 other location - About 2 hrs to fix
        eventol/manager/tests/conftest.py on lines 323..344

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

        @pytest.fixture
        @pytest.mark.django_db
        def attendee_from_event_user1(event_user1, event1):
            yield autofixture.create_one(
                'manager.Attendee', {
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 1 other location - About 1 hr to fix
        eventol/manager/tests/conftest.py on lines 139..146

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

        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.fixture
        @pytest.mark.django_db
        def event_user1(user1, event1):
            yield autofixture.create_one(
                'manager.EventUser', {'user': user1, 'event': event1}, generate_fk=True
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 1 other location - About 1 hr to fix
        eventol/manager/tests/conftest.py on lines 105..109

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

        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.fixture
        @pytest.mark.django_db
        def attendee_from_event_user2(event_user2, event2):
            yield autofixture.create_one(
                'manager.Attendee', {
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 1 other location - About 1 hr to fix
        eventol/manager/tests/conftest.py on lines 127..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 38.

        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.fixture
        @pytest.mark.django_db
        def event_user2(user2, event2):
            yield autofixture.create_one(
                'manager.EventUser', {'user': user2, 'event': event2}, generate_fk=True
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 1 other location - About 1 hr to fix
        eventol/manager/tests/conftest.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 38.

        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.fixture
        @pytest.mark.django_db
        def event2(event_tag_2):
            yield autofixture.create_one(
                'manager.Event',
        Severity: Minor
        Found in eventol/manager/tests/conftest.py and 1 other location - About 55 mins to fix
        eventol/manager/tests/conftest.py on lines 55..60

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 37.

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

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

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

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

        Refactorings

        Further Reading

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

        @pytest.fixture
        @pytest.mark.django_db
        def event1(event_tag_1):
            yield autofixture.create_one(
                'manager.Event',
        Severity: Minor
        Found in eventol/manager/tests/conftest.py and 1 other location - About 55 mins to fix
        eventol/manager/tests/conftest.py on lines 64..69

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 37.

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

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

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

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

        Refactorings

        Further Reading

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

        @pytest.fixture
        @pytest.mark.django_db
        def installation1(attendee_from_event_user1, installer1):
            yield autofixture.create_one(
                'manager.Installation',
        Severity: Minor
        Found in eventol/manager/tests/conftest.py and 1 other location - About 50 mins to fix
        eventol/manager/tests/conftest.py on lines 239..244

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

        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.fixture
        @pytest.mark.django_db
        def installation2(attendee_from_event_user2, installer2):
            yield autofixture.create_one(
                'manager.Installation',
        Severity: Minor
        Found in eventol/manager/tests/conftest.py and 1 other location - About 50 mins to fix
        eventol/manager/tests/conftest.py on lines 230..235

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

        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.fixture
        @pytest.mark.django_db
        def user2():
            yield autofixture.create_one('auth.User', {
                'username': USER_USERNAME_2,
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 2 other locations - About 45 mins to fix
        eventol/manager/tests/conftest.py on lines 24..31
        eventol/manager/tests/conftest.py on lines 74..81

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 35.

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

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

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

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

        Refactorings

        Further Reading

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

        @pytest.fixture
        @pytest.mark.django_db
        def activity1(event1):
            yield autofixture.create_one('manager.Activity', {'event': event1}, generate_fk=True)
        Severity: Minor
        Found in eventol/manager/tests/conftest.py and 1 other location - About 45 mins to fix
        eventol/manager/tests/conftest.py on lines 210..213

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 35.

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

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

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

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

        Refactorings

        Further Reading

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

        @pytest.fixture
        @pytest.mark.django_db
        def admin():
            yield autofixture.create_one('auth.User', {
                'username': ADMIN_USERNAME,
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 2 other locations - About 45 mins to fix
        eventol/manager/tests/conftest.py on lines 74..81
        eventol/manager/tests/conftest.py on lines 85..92

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 35.

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

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

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

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

        Refactorings

        Further Reading

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

        @pytest.fixture
        @pytest.mark.django_db
        def activity2(event2):
            yield autofixture.create_one('manager.Activity', {'event': event2}, generate_fk=True)
        Severity: Minor
        Found in eventol/manager/tests/conftest.py and 1 other location - About 45 mins to fix
        eventol/manager/tests/conftest.py on lines 204..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 35.

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

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

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

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

        Refactorings

        Further Reading

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

        @pytest.fixture
        @pytest.mark.django_db
        def user1():
            yield autofixture.create_one('auth.User', {
                'username': USER_USERNAME_1,
        Severity: Major
        Found in eventol/manager/tests/conftest.py and 2 other locations - About 45 mins to fix
        eventol/manager/tests/conftest.py on lines 24..31
        eventol/manager/tests/conftest.py on lines 85..92

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 35.

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

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

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

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

        Refactorings

        Further Reading

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

        @pytest.fixture
        @pytest.mark.django_db
        def attendee_without_user2(event2):
            yield autofixture.create_one('manager.Attendee', {'event_user': None, 'event': event2})
        Severity: Minor
        Found in eventol/manager/tests/conftest.py and 1 other location - About 35 mins to fix
        eventol/manager/tests/conftest.py on lines 114..117

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 33.

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

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

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

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

        Refactorings

        Further Reading

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

        @pytest.fixture
        @pytest.mark.django_db
        def attendee_without_user1(event1):
            yield autofixture.create_one('manager.Attendee', {'event_user': None, 'event': event1})
        Severity: Minor
        Found in eventol/manager/tests/conftest.py and 1 other location - About 35 mins to fix
        eventol/manager/tests/conftest.py on lines 120..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 33.

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

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

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

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

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status