datahuborg/datahub

View on GitHub
src/functional_tests/test_db.py

Summary

Maintainability
A
3 hrs
Test Coverage

Function test_add_remove_collaborator has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def test_add_remove_collaborator(self):
        # must be lowercase
        eazyE = 'delete_me_eazye'
        dre = 'delete_me_dre'
        snoop = 'delete_me_snoop'
Severity: Major
Found in src/functional_tests/test_db.py - About 2 hrs to fix

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

        def test_public_repo(self):
            # Django migrations.RunPython doesn't happen before each test.
            # To work around this we call some methods (that should have been done
            # in migrations) here.
            # Django 1.8/1.9 https://code.djangoproject.com/ticket/23640
    Severity: Minor
    Found in src/functional_tests/test_db.py - About 1 hr to fix

      Do not use bare 'except'
      Open

              except:
      Severity: Minor
      Found in src/functional_tests/test_db.py by pep8

      When catching exceptions, mention specific exceptions when possible.

      Okay: except Exception:
      Okay: except BaseException:
      E722: except:

      Do not use bare 'except'
      Open

              except:
      Severity: Minor
      Found in src/functional_tests/test_db.py by pep8

      When catching exceptions, mention specific exceptions when possible.

      Okay: except Exception:
      Okay: except BaseException:
      E722: except:

      Do not use bare 'except'
      Open

              except:
      Severity: Minor
      Found in src/functional_tests/test_db.py by pep8

      When catching exceptions, mention specific exceptions when possible.

      Okay: except Exception:
      Okay: except BaseException:
      E722: except:

      Missing whitespace after keyword
      Open

      from account.management.commands.createpublicanonuser import(
      Severity: Minor
      Found in src/functional_tests/test_db.py by pep8

      Multiple imports in form from x import (a, b, c) should have space between import statement and parenthesised name list.

      Okay: from foo import (bar, baz)
      E275: from foo import(bar, baz)
      E275: from importable.module import(bar, baz)

      There are no issues that match your filters.

      Category
      Status