changeset 7111:369a646638f3

tests: fix some pyflakes warnings for vcs
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 07 Feb 2018 00:43:34 +0100
parents 9f976d75b04c
children fc33889cb798
files kallithea/tests/vcs/conf.py kallithea/tests/vcs/test_git.py kallithea/tests/vcs/test_inmemchangesets.py
diffstat 3 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/vcs/conf.py	Tue Feb 06 00:32:48 2018 +0100
+++ b/kallithea/tests/vcs/conf.py	Wed Feb 07 00:43:34 2018 +0100
@@ -2,10 +2,7 @@
 Unit tests configuration module for vcs.
 """
 import os
-import time
-import hashlib
 import tempfile
-import datetime
 import shutil
 import uuid
 
--- a/kallithea/tests/vcs/test_git.py	Tue Feb 06 00:32:48 2018 +0100
+++ b/kallithea/tests/vcs/test_git.py	Wed Feb 07 00:43:34 2018 +0100
@@ -35,7 +35,7 @@
         repo_inject_path = TEST_GIT_REPO + '; echo "Cake";'
         with self.assertRaises(urllib2.URLError):
             # Should fail because URL will contain the parts after ; too
-            urlerror_fail_repo = GitRepository(get_new_dir('injection-repo'), src_url=repo_inject_path, update_after_clone=True, create=True)
+            GitRepository(get_new_dir('injection-repo'), src_url=repo_inject_path, update_after_clone=True, create=True)
 
         with self.assertRaises(RepositoryError):
             # Should fail on direct clone call, which as of this writing does not happen outside of class
--- a/kallithea/tests/vcs/test_inmemchangesets.py	Tue Feb 06 00:32:48 2018 +0100
+++ b/kallithea/tests/vcs/test_inmemchangesets.py	Wed Feb 07 00:43:34 2018 +0100
@@ -355,7 +355,6 @@
         """
         Returns newly created repository's directory.
         """
-        backend = self.get_backend()
         key = '%s-%s' % (self.backend_alias, str(time.time()))
         repo_path = get_new_dir(key)
         return repo_path