The SIO2 project
  1. The SIO2 project
  2. SIO-1548

unit tests: add assertNumQueries to unit tests to avoid sql queries explosion

    Details

    • Type: Task Task
    • Status: New New
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Current Version
    • Component/s: OIOIOI
    • Labels:
      None

      Description

      It's quite easy to generate linear number of sql queries in django. It's hard to detect without a large database and django toolbar, so its usally detected during programming contests.

      To avoid such situation IMHO we should test number of sql queries in unit tests. Django supports it:

      https://docs.djangoproject.com/en/1.5/topics/testing/overview/#django.test.TestCase.assertNumQueries

      The task is to add such assertion to each unit test.

        Activity

        Connect your code to JIRA

        Link every code change to JIRA just by adding an issue keys in commit messages. Bridge the gap back to your source and know which changes fixed which JIRA issues.

        Git & Mercurial in the cloud

        Collaborate across unlimited private code repositories.

        Git behind the firewall

        Manage and collaborate on Git repositories behind a firewall.

        Browse and search code

        Browse, search, and track source code repositories.

          People

          • Assignee:
            Unassigned
            Reporter:
            MichaƂ Adamczyk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: