intranet/apps/schedule/tests.py

Summary

Maintainability
F
5 days
Test Coverage

File tests.py has 294 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import json
from datetime import date, datetime
from unittest.mock import patch

import pytz
Severity: Minor
Found in intranet/apps/schedule/tests.py - About 3 hrs to fix

    Function test_admin_daytype_view has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def test_admin_daytype_view(self):
            self.make_admin()
    
            response = self.client.get(reverse("schedule_daytype"))
            self.assertEqual(200, response.status_code)
    Severity: Minor
    Found in intranet/apps/schedule/tests.py - About 1 hr to fix

      Function test_do_default_fill has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def test_do_default_fill(self):
              self.make_admin()
              response = self.client.post(reverse("schedule_admin"), data={"default_fill": "default_fill", "month": "2021-03"}, follow=True)
              self.assertEqual(200, response.status_code)
              self.assertIn("Make sure you have DayTypes defined for Anchor Days, Blue Days, and Red Days.", response.context["msgs"])
      Severity: Minor
      Found in intranet/apps/schedule/tests.py - About 1 hr to fix

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

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 20, 10, 00, tzinfo=pytz.timezone("US/Eastern"))):
                    sched = schedule_context()
                    self.assertEqual("2021-03-22", sched["sched_ctx"]["date_today"])
                    self.assertEqual("2021-03-23", sched["sched_ctx"]["date_tomorrow"])
                    self.assertEqual("2021-03-19", sched["sched_ctx"]["date_yesterday"])
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 3 other locations - About 6 hrs to fix
        intranet/apps/schedule/tests.py on lines 47..51
        intranet/apps/schedule/tests.py on lines 54..58
        intranet/apps/schedule/tests.py on lines 61..68

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

        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

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 25, 22, 00, tzinfo=pytz.timezone("US/Eastern"))):
                    sched = schedule_context()
                    self.assertEqual("2021-03-26", sched["sched_ctx"]["date_today"])
        
                    # Tomorrow would actually be Saturday (if "today" is Friday), but we don't do weekends.
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 3 other locations - About 6 hrs to fix
        intranet/apps/schedule/tests.py on lines 33..37
        intranet/apps/schedule/tests.py on lines 47..51
        intranet/apps/schedule/tests.py on lines 54..58

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

        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

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 24, 22, 00, tzinfo=pytz.timezone("US/Eastern"))):
                    sched = schedule_context()
                    self.assertEqual("2021-03-25", sched["sched_ctx"]["date_today"])
                    self.assertEqual("2021-03-26", sched["sched_ctx"]["date_tomorrow"])
                    self.assertEqual("2021-03-24", sched["sched_ctx"]["date_yesterday"])
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 3 other locations - About 6 hrs to fix
        intranet/apps/schedule/tests.py on lines 33..37
        intranet/apps/schedule/tests.py on lines 47..51
        intranet/apps/schedule/tests.py on lines 61..68

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

        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

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 24, 15, 00, tzinfo=pytz.timezone("US/Eastern"))):
                    sched = schedule_context()
                    self.assertEqual("2021-03-24", sched["sched_ctx"]["date_today"])
                    self.assertEqual("2021-03-25", sched["sched_ctx"]["date_tomorrow"])
                    self.assertEqual("2021-03-23", sched["sched_ctx"]["date_yesterday"])
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 3 other locations - About 6 hrs to fix
        intranet/apps/schedule/tests.py on lines 33..37
        intranet/apps/schedule/tests.py on lines 54..58
        intranet/apps/schedule/tests.py on lines 61..68

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

        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_schedule_widget_view(self):
                self.login()
                response = self.client.get(reverse("schedule_widget"))
                self.assertEqual(200, response.status_code)
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 3 other locations - About 1 hr to fix
        intranet/apps/auth/tests.py on lines 57..60
        intranet/apps/announcements/tests.py on lines 108..111
        intranet/apps/sessionmgmt/tests.py on lines 7..10

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 42.

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

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

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

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

        Refactorings

        Further Reading

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

                response = self.client.post(
                    reverse("schedule_daytype", kwargs={"daytype_id": old_daytype.id}), data={"make_copy": "make_copy", "id": old_daytype.id}, follow=True
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 1 other location - About 1 hr to fix
        intranet/apps/schedule/tests.py on lines 344..345

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 42.

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

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

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

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

        Refactorings

        Further Reading

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

                response = self.client.post(
                    reverse("schedule_daytype", kwargs={"daytype_id": new_daytype.id}), data={"delete": "delete", "id": new_daytype.id}, follow=True
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 1 other location - About 1 hr to fix
        intranet/apps/schedule/tests.py on lines 334..335

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 42.

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

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

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

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

        Refactorings

        Further Reading

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

                self.assertEqual(1, len(Block.objects.filter(name="Period 2", start__hour=10, start__minute=25, end__hour=12, end__minute=0)))
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 2 other locations - About 50 mins to fix
        intranet/apps/schedule/tests.py on lines 282..282
        intranet/apps/schedule/tests.py on lines 308..308

        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

                self.assertEqual(1, len(Block.objects.filter(name="Period 1", start__hour=8, start__minute=40, end__hour=10, end__minute=15)))
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 2 other locations - About 50 mins to fix
        intranet/apps/schedule/tests.py on lines 283..283
        intranet/apps/schedule/tests.py on lines 308..308

        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

                self.assertEqual(1, len(Block.objects.filter(name="Period 2", start__hour=10, start__minute=25, end__hour=12, end__minute=40)))
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 2 other locations - About 50 mins to fix
        intranet/apps/schedule/tests.py on lines 282..282
        intranet/apps/schedule/tests.py on lines 283..283

        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

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

                    self.assertEqual("2021-03-23", data["days"][1]["sched_ctx"]["date_today"])  # second day of the week
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 6 other locations - About 40 mins to fix
        intranet/apps/schedule/tests.py on lines 126..126
        intranet/apps/schedule/tests.py on lines 127..127
        intranet/apps/schedule/tests.py on lines 128..128
        intranet/apps/schedule/tests.py on lines 135..135
        intranet/apps/schedule/tests.py on lines 137..137
        intranet/apps/schedule/tests.py on lines 394..394

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

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

                self.assertEqual("Hello Day", response_data["results"][0]["day_type"]["name"])
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 6 other locations - About 40 mins to fix
        intranet/apps/schedule/tests.py on lines 126..126
        intranet/apps/schedule/tests.py on lines 127..127
        intranet/apps/schedule/tests.py on lines 128..128
        intranet/apps/schedule/tests.py on lines 135..135
        intranet/apps/schedule/tests.py on lines 136..136
        intranet/apps/schedule/tests.py on lines 137..137

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

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

                    self.assertEqual("2021-03-22", data["days"][0]["sched_ctx"]["date_today"])  # first day of the week
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 6 other locations - About 40 mins to fix
        intranet/apps/schedule/tests.py on lines 127..127
        intranet/apps/schedule/tests.py on lines 128..128
        intranet/apps/schedule/tests.py on lines 135..135
        intranet/apps/schedule/tests.py on lines 136..136
        intranet/apps/schedule/tests.py on lines 137..137
        intranet/apps/schedule/tests.py on lines 394..394

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

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

                    self.assertEqual("2021-03-23", data["days"][1]["sched_ctx"]["date_today"])  # second day of the week
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 6 other locations - About 40 mins to fix
        intranet/apps/schedule/tests.py on lines 126..126
        intranet/apps/schedule/tests.py on lines 128..128
        intranet/apps/schedule/tests.py on lines 135..135
        intranet/apps/schedule/tests.py on lines 136..136
        intranet/apps/schedule/tests.py on lines 137..137
        intranet/apps/schedule/tests.py on lines 394..394

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

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

                    self.assertEqual("2021-03-26", data["days"][-1]["sched_ctx"]["date_today"])  # last day of the week
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 6 other locations - About 40 mins to fix
        intranet/apps/schedule/tests.py on lines 126..126
        intranet/apps/schedule/tests.py on lines 127..127
        intranet/apps/schedule/tests.py on lines 128..128
        intranet/apps/schedule/tests.py on lines 135..135
        intranet/apps/schedule/tests.py on lines 136..136
        intranet/apps/schedule/tests.py on lines 394..394

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

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

                    self.assertEqual("2021-03-22", data["days"][0]["sched_ctx"]["date_today"])  # first day of the week
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 6 other locations - About 40 mins to fix
        intranet/apps/schedule/tests.py on lines 126..126
        intranet/apps/schedule/tests.py on lines 127..127
        intranet/apps/schedule/tests.py on lines 128..128
        intranet/apps/schedule/tests.py on lines 136..136
        intranet/apps/schedule/tests.py on lines 137..137
        intranet/apps/schedule/tests.py on lines 394..394

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

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

                    self.assertEqual("2021-03-26", data["days"][-1]["sched_ctx"]["date_today"])  # last day of the week
        Severity: Major
        Found in intranet/apps/schedule/tests.py and 6 other locations - About 40 mins to fix
        intranet/apps/schedule/tests.py on lines 126..126
        intranet/apps/schedule/tests.py on lines 127..127
        intranet/apps/schedule/tests.py on lines 135..135
        intranet/apps/schedule/tests.py on lines 136..136
        intranet/apps/schedule/tests.py on lines 137..137
        intranet/apps/schedule/tests.py on lines 394..394

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

        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

        Line too long (150 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 24, 15, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (80 > 79 characters)
        Open

                    self.assertEqual("2021-03-25", sched["sched_ctx"]["date_yesterday"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (150 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 21, 22, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (95 > 79 characters)
        Open

                    # Tomorrow would actually be Monday (if today is Sunday), but we don't do weekends.
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (111 > 79 characters)
        Open

                    self.assertEqual("2021-03-22", data["days"][0]["sched_ctx"]["date_today"])  # first day of the week
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (144 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.now", return_value=datetime(2021, 3, 26, 10, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (114 > 79 characters)
        Open

                response = self.client.post(reverse("schedule_admin"), data={"delete_cache": "delete_cache"}, follow=True)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (99 > 79 characters)
        Open

                response = self.client.get(reverse("schedule_daytype"), data={"assign_date": "2021-03-22"})
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (80 > 79 characters)
        Open

                self.assertEqual(1, DayType.objects.filter(name="Anchored Day").count())
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (80 > 79 characters)
        Open

                    self.assertEqual("2021-03-19", sched["sched_ctx"]["date_yesterday"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (112 > 79 characters)
        Open

                    self.assertEqual("2021-03-23", data["days"][1]["sched_ctx"]["date_today"])  # second day of the week
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (146 > 79 characters)
        Open

                    reverse("schedule_daytype", kwargs={"daytype_id": old_daytype.id}), data={"make_copy": "make_copy", "id": old_daytype.id}, follow=True
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (93 > 79 characters)
        Open

                response = self.client.get(reverse("api_schedule_day_list"), data={"format": "json"})
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (134 > 79 characters)
        Open

                response = self.client.get(reverse("api_schedule_day_detail", kwargs={"date": new_date.isoformat()}), data={"format": "json"})
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (150 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 26, 22, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (128 > 79 characters)
        Open

                self.assertIn("Make sure you have DayTypes defined for Anchor Days, Blue Days, and Red Days.", response.context["msgs"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (134 > 79 characters)
        Open

                response = self.client.get(reverse("api_schedule_day_detail", kwargs={"date": day.date.isoformat()}), data={"format": "json"})
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (99 > 79 characters)
        Open

                    # Tomorrow would actually be Saturday (if "today" is Friday), but we don't do weekends.
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (83 > 79 characters)
        Open

                self.assertEqual(0, DayType.objects.filter(name="Test Day (Copy)").count())
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (94 > 79 characters)
        Open

                # day_yesterday = Day.objects.update_or_create(date="2021-03-19", day_type=daytype)[0]
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (125 > 79 characters)
        Open

                    sched = schedule_context(request=request, date=datetime(2021, 3, 21, 22, 00, tzinfo=pytz.timezone("US/Eastern")))
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (112 > 79 characters)
        Open

                    self.assertEqual("2021-03-23", data["days"][1]["sched_ctx"]["date_today"])  # second day of the week
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (86 > 79 characters)
        Open

                self.assertEqual("I like Tuesday", Day.objects.get(date="2021-03-02").comment)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (134 > 79 characters)
        Open

                self.assertEqual(1, len(Block.objects.filter(name="Period 2", start__hour=10, start__minute=25, end__hour=12, end__minute=0)))
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (93 > 79 characters)
        Open

                response = self.client.post(reverse("schedule_daytype"), data={"id": old_daytype.id})
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (135 > 79 characters)
        Open

                self.assertEqual(1, len(Block.objects.filter(name="Period 2", start__hour=10, start__minute=25, end__hour=12, end__minute=40)))
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (150 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 26, 10, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (92 > 79 characters)
        Open

                response = self.client.get(reverse("schedule_comment"), data={"date": "2021-03-02"})
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (111 > 79 characters)
        Open

                    Block.objects.get(name="Period 2", start__hour=10, start__minute=25, end__hour=12, end__minute=40),
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (111 > 79 characters)
        Open

                    self.assertEqual("2021-03-22", data["days"][0]["sched_ctx"]["date_today"])  # first day of the week
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (82 > 79 characters)
        Open

                self.assertEqual(old_daytype, Day.objects.get(date="2021-03-22").day_type)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (92 > 79 characters)
        Open

                day = Day.objects.get_or_create(date=timezone.localdate(), day_type=snow_daytype)[0]
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (80 > 79 characters)
        Open

                    self.assertEqual("2021-03-19", sched["sched_ctx"]["date_yesterday"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (150 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 21, 10, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (140 > 79 characters)
        Open

                    reverse("schedule_daytype", kwargs={"daytype_id": new_daytype.id}), data={"delete": "delete", "id": new_daytype.id}, follow=True
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (94 > 79 characters)
        Open

                Day.objects.get_or_create(date=date.today() + timezone.timedelta(1), day_type=daytype)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (150 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 24, 22, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (80 > 79 characters)
        Open

                    self.assertEqual("2021-03-24", sched["sched_ctx"]["date_yesterday"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (111 > 79 characters)
        Open

                    self.assertEqual("2021-03-26", data["days"][-1]["sched_ctx"]["date_today"])  # last day of the week
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (88 > 79 characters)
        Open

                response = self.client.get(reverse("schedule_admin"), data={"month": "2021-05"})
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (134 > 79 characters)
        Open

                response = self.client.post(reverse("schedule_admin"), data={"default_fill": "default_fill", "month": "2021-03"}, follow=True)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (104 > 79 characters)
        Open

                sched = schedule_context(date=datetime(2021, 3, 20, 10, 00, tzinfo=pytz.timezone("US/Eastern")))
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (80 > 79 characters)
        Open

                    self.assertEqual("2021-03-23", sched["sched_ctx"]["date_yesterday"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (150 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 25, 22, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (88 > 79 characters)
        Open

                day_today = Day.objects.update_or_create(date="2021-03-22", day_type=daytype)[0]
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (111 > 79 characters)
        Open

                    self.assertEqual("2021-03-26", data["days"][-1]["sched_ctx"]["date_today"])  # last day of the week
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (102 > 79 characters)
        Open

                response = self.client.post(reverse("schedule_add"), data={"date": "2021-03-02"}, follow=True)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (93 > 79 characters)
        Open

                self.assertEqual(2, DayType.objects.get(name="Test Day (Copy)").blocks.all().count())
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (93 > 79 characters)
        Open

                response = self.client.get(reverse("api_schedule_day_list"), data={"format": "json"})
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (86 > 79 characters)
        Open

                self.assertEqual("Hello Day", response_data["results"][0]["day_type"]["name"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (99 > 79 characters)
        Open

                snow_daytype = DayType.objects.get_or_create(name="No School -- Snow Day", special=True)[0]
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (134 > 79 characters)
        Open

                response = self.client.post(reverse("schedule_admin"), data={"default_fill": "default_fill", "month": "2021-03"}, follow=True)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (123 > 79 characters)
        Open

                response = self.client.post(reverse("schedule_add"), data={"date": "2021-03-02", "day_type": blue.id}, follow=True)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (135 > 79 characters)
        Open

                response = self.client.post(reverse("schedule_comment"), data={"date": "2021-03-02", "comment": "I like Tuesday"}, follow=True)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (83 > 79 characters)
        Open

                self.assertEqual(1, DayType.objects.filter(name="Test Day (Copy)").count())
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (134 > 79 characters)
        Open

                self.assertEqual(1, len(Block.objects.filter(name="Period 1", start__hour=8, start__minute=40, end__hour=10, end__minute=15)))
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (150 > 79 characters)
        Open

                with patch("intranet.apps.schedule.views.timezone.localtime", return_value=datetime(2021, 3, 20, 10, 00, tzinfo=pytz.timezone("US/Eastern"))):
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (80 > 79 characters)
        Open

                    self.assertEqual(day_today, sched["sched_ctx"]["schedule_tomorrow"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (134 > 79 characters)
        Open

                response = self.client.post(reverse("schedule_admin"), data={"default_fill": "default_fill", "month": "2021-03"}, follow=True)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (93 > 79 characters)
        Open

                # day_tomorrow = Day.objects.update_or_create(date="2021-03-23", day_type=daytype)[0]
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (131 > 79 characters)
        Open

                self.assertNotIn("Make sure you have DayTypes defined for Anchor Days, Blue Days, and Red Days.", response.context["msgs"])
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (102 > 79 characters)
        Open

                response = self.client.get(reverse("schedule_daytype", kwargs={"daytype_id": old_daytype.id}))
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (107 > 79 characters)
        Open

                    self.client.post(reverse("schedule_admin"), data={"delete_cache": "delete_cache"}, follow=True)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (111 > 79 characters)
        Open

                self.assertEqual(DayType.objects.get(name="Anchored Day"), Day.objects.get(date="2021-03-22").day_type)
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (103 > 79 characters)
        Open

                day = Day.objects.get_or_create(date=date.today() + timezone.timedelta(1), day_type=daytype)[0]
        Severity: Minor
        Found in intranet/apps/schedule/tests.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        There are no issues that match your filters.

        Category
        Status