Showing 498 of 5,910 total issues

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

        response = self.client.get(reverse("api_announcements_detail", kwargs={"pk": announce.id}), data={"format": "json"})
Severity: Major
Found in intranet/apps/announcements/tests.py and 11 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 310..310
intranet/apps/eighth/tests/test_attendance.py on lines 503..503
intranet/apps/eighth/tests/test_attendance.py on lines 511..511
intranet/apps/polls/tests.py on lines 243..245
intranet/apps/polls/tests.py on lines 255..257
intranet/apps/polls/tests.py on lines 266..268
intranet/apps/polls/tests.py on lines 276..278
intranet/apps/polls/tests.py on lines 370..372
intranet/apps/polls/tests.py on lines 426..428
intranet/apps/polls/tests.py on lines 437..439
intranet/apps/polls/tests.py on lines 448..450

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

        response = self.client.post(
            reverse("poll_vote", kwargs={"poll_id": poll.id}),
            data={"question-1": "CLEAR"},
Severity: Major
Found in intranet/apps/polls/tests.py and 11 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 310..310
intranet/apps/eighth/tests/test_attendance.py on lines 503..503
intranet/apps/eighth/tests/test_attendance.py on lines 511..511
intranet/apps/announcements/tests.py on lines 473..473
intranet/apps/polls/tests.py on lines 243..245
intranet/apps/polls/tests.py on lines 255..257
intranet/apps/polls/tests.py on lines 266..268
intranet/apps/polls/tests.py on lines 276..278
intranet/apps/polls/tests.py on lines 426..428
intranet/apps/polls/tests.py on lines 437..439
intranet/apps/polls/tests.py on lines 448..450

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

        response = self.client.get(reverse("eighth_admin_delete_activity", kwargs={"activity_id": activity.id}), data={"perm": "perm"})
Severity: Major
Found in intranet/apps/eighth/tests/admin/test_admin_activities.py and 11 other locations - About 45 mins to fix
intranet/apps/eighth/tests/test_attendance.py on lines 503..503
intranet/apps/eighth/tests/test_attendance.py on lines 511..511
intranet/apps/announcements/tests.py on lines 473..473
intranet/apps/polls/tests.py on lines 243..245
intranet/apps/polls/tests.py on lines 255..257
intranet/apps/polls/tests.py on lines 266..268
intranet/apps/polls/tests.py on lines 276..278
intranet/apps/polls/tests.py on lines 370..372
intranet/apps/polls/tests.py on lines 426..428
intranet/apps/polls/tests.py on lines 437..439
intranet/apps/polls/tests.py on lines 448..450

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

        response = self.client.post(reverse("eighth_accept_pass", kwargs={"signup_id": signup.id}), data={"status": "reject"})
Severity: Major
Found in intranet/apps/eighth/tests/test_attendance.py and 11 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 310..310
intranet/apps/eighth/tests/test_attendance.py on lines 511..511
intranet/apps/announcements/tests.py on lines 473..473
intranet/apps/polls/tests.py on lines 243..245
intranet/apps/polls/tests.py on lines 255..257
intranet/apps/polls/tests.py on lines 266..268
intranet/apps/polls/tests.py on lines 276..278
intranet/apps/polls/tests.py on lines 370..372
intranet/apps/polls/tests.py on lines 426..428
intranet/apps/polls/tests.py on lines 437..439
intranet/apps/polls/tests.py on lines 448..450

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

        response = self.client.post(
            reverse("poll_vote", kwargs={"poll_id": poll.id}),
            data={"question-1": "1"},
Severity: Major
Found in intranet/apps/polls/tests.py and 11 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 310..310
intranet/apps/eighth/tests/test_attendance.py on lines 503..503
intranet/apps/eighth/tests/test_attendance.py on lines 511..511
intranet/apps/announcements/tests.py on lines 473..473
intranet/apps/polls/tests.py on lines 243..245
intranet/apps/polls/tests.py on lines 266..268
intranet/apps/polls/tests.py on lines 276..278
intranet/apps/polls/tests.py on lines 370..372
intranet/apps/polls/tests.py on lines 426..428
intranet/apps/polls/tests.py on lines 437..439
intranet/apps/polls/tests.py on lines 448..450

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

        response = self.client.post(
            reverse("poll_vote", kwargs={"poll_id": poll.id}),
            data={"question-1": "different test content"},
Severity: Major
Found in intranet/apps/polls/tests.py and 11 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 310..310
intranet/apps/eighth/tests/test_attendance.py on lines 503..503
intranet/apps/eighth/tests/test_attendance.py on lines 511..511
intranet/apps/announcements/tests.py on lines 473..473
intranet/apps/polls/tests.py on lines 243..245
intranet/apps/polls/tests.py on lines 255..257
intranet/apps/polls/tests.py on lines 266..268
intranet/apps/polls/tests.py on lines 276..278
intranet/apps/polls/tests.py on lines 370..372
intranet/apps/polls/tests.py on lines 426..428
intranet/apps/polls/tests.py on lines 437..439

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

        response = self.client.post(
            reverse("poll_vote", kwargs={"poll_id": poll.id}),
            data={"question-1": "3"},
Severity: Major
Found in intranet/apps/polls/tests.py and 11 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 310..310
intranet/apps/eighth/tests/test_attendance.py on lines 503..503
intranet/apps/eighth/tests/test_attendance.py on lines 511..511
intranet/apps/announcements/tests.py on lines 473..473
intranet/apps/polls/tests.py on lines 243..245
intranet/apps/polls/tests.py on lines 255..257
intranet/apps/polls/tests.py on lines 266..268
intranet/apps/polls/tests.py on lines 370..372
intranet/apps/polls/tests.py on lines 426..428
intranet/apps/polls/tests.py on lines 437..439
intranet/apps/polls/tests.py on lines 448..450

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

        response = self.client.post(
            reverse("poll_vote", kwargs={"poll_id": poll.id}),
            data={"question-1": "CLEAR"},
Severity: Major
Found in intranet/apps/polls/tests.py and 11 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 310..310
intranet/apps/eighth/tests/test_attendance.py on lines 503..503
intranet/apps/eighth/tests/test_attendance.py on lines 511..511
intranet/apps/announcements/tests.py on lines 473..473
intranet/apps/polls/tests.py on lines 243..245
intranet/apps/polls/tests.py on lines 255..257
intranet/apps/polls/tests.py on lines 276..278
intranet/apps/polls/tests.py on lines 370..372
intranet/apps/polls/tests.py on lines 426..428
intranet/apps/polls/tests.py on lines 437..439
intranet/apps/polls/tests.py on lines 448..450

Duplicated Code

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

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

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

Tuning

This issue has a mass of 35.

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

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

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

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

Refactorings

Further Reading

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

                try:
                    sftp.chdir(host_dir)
                except exceptions as e:
                    messages.error(request, e)
                    return redirect("files")
Severity: Major
Found in intranet/apps/files/views.py and 3 other locations - About 45 mins to fix
intranet/apps/files/views.py on lines 172..195
intranet/apps/files/views.py on lines 237..242
intranet/apps/files/views.py on lines 396..400

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

        response = self.client.get(
            reverse("eighth_admin_view_delinquent_students"),
            data={"lower": 1, "upper": 100, "freshmen": "on", "sophomores": "on", "juniors": "on", "seniors": "on"},
Severity: Major
Found in intranet/apps/eighth/tests/admin/test_admin_attendance.py and 2 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_attendance.py on lines 104..106
intranet/apps/eighth/tests/admin/test_admin_attendance.py on lines 119..121

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

    def test_get_emerg(self):
        response = self.client.get(reverse("api_emerg_status"))
        self.assertEqual(response.status_code, 200)
Severity: Minor
Found in intranet/apps/api/tests.py and 1 other location - About 45 mins to fix
intranet/apps/api/tests.py on lines 205..208

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

        self.assertEqual([room1, room2], list(EighthActivity.objects.get(id=activity.id).rooms.all()))
Severity: Minor
Found in intranet/apps/eighth/tests/admin/test_admin_activities.py and 1 other location - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 138..138

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

    def test_api_root(self):
        # Should be able to read API root without authentication
        response = self.client.get(reverse("api_root"))
        self.assertEqual(response.status_code, 200)
Severity: Minor
Found in intranet/apps/api/tests.py and 1 other location - About 45 mins to fix
intranet/apps/api/tests.py on lines 60..62

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

    def test_schedule_embed(self):
        response = self.client.get(reverse("schedule_embed"))
        self.assertEqual(200, response.status_code)
Severity: Minor
Found in intranet/apps/schedule/tests.py and 1 other location - About 45 mins to fix
intranet/apps/schedule/tests.py on lines 112..114

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

        response = self.client.get(
            reverse("eighth_admin_view_delinquent_students"),
            data={"lower": 1, "upper": 100, "freshmen": "on", "sophomores": "on", "juniors": "on", "seniors": "on"},
Severity: Major
Found in intranet/apps/eighth/tests/admin/test_admin_attendance.py and 2 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_attendance.py on lines 89..91
intranet/apps/eighth/tests/admin/test_admin_attendance.py on lines 119..121

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

        self.assertEqual([sponsor, sponsor2], list(EighthActivity.objects.get(id=activity.id).sponsors.all()))
Severity: Minor
Found in intranet/apps/eighth/tests/admin/test_admin_activities.py and 1 other location - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_activities.py on lines 204..204

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

    def test_schedule_view(self):
        response = self.client.get(reverse("schedule"))
        self.assertEqual(200, response.status_code)
Severity: Minor
Found in intranet/apps/schedule/tests.py and 1 other location - About 45 mins to fix
intranet/apps/schedule/tests.py on lines 165..167

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

        response = self.client.get(
            reverse("eighth_admin_download_delinquent_students_csv"),
            data={"lower": 1, "upper": 100, "freshmen": "on", "sophomores": "on", "juniors": "on", "seniors": "on"},
Severity: Major
Found in intranet/apps/eighth/tests/admin/test_admin_attendance.py and 2 other locations - About 45 mins to fix
intranet/apps/eighth/tests/admin/test_admin_attendance.py on lines 89..91
intranet/apps/eighth/tests/admin/test_admin_attendance.py on lines 104..106

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

        response = self.client.get(reverse("apps") + "?id=" + str(app.id))
Severity: Major
Found in intranet/apps/cslapps/tests.py and 2 other locations - About 45 mins to fix
intranet/apps/cslapps/tests.py on lines 40..40
intranet/apps/cslapps/tests.py on lines 47..47

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

        response = self.client.get(reverse("apps") + "?id=" + str(restricted_app.id))
Severity: Major
Found in intranet/apps/cslapps/tests.py and 2 other locations - About 45 mins to fix
intranet/apps/cslapps/tests.py on lines 24..24
intranet/apps/cslapps/tests.py on lines 47..47

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

Severity
Category
Status
Source
Language