From eb754e9c95b2c85140a6fe368a99eac461046378 Mon Sep 17 00:00:00 2001
From: Ondrej Nosek <onosek@redhat.com>
Date: Jun 12 2018 13:05:20 +0000
Subject: Fixing imports in unittests


Relates: PR#327

Signed-off-by: Ondrej Nosek <onosek@redhat.com>

---

diff --git a/tests/commands/test_clone.py b/tests/commands/test_clone.py
index ad5272a..af143bf 100644
--- a/tests/commands/test_clone.py
+++ b/tests/commands/test_clone.py
@@ -4,8 +4,9 @@ import tempfile
 
 import git
 
-from . import CommandTestCase
+import pyrpkg
 
+from . import CommandTestCase
 
 CLONE_CONFIG = '''
     bz.default-component %(module)s
@@ -17,7 +18,6 @@ class CommandCloneTestCase(CommandTestCase):
     def test_clone_anonymous(self):
         self.make_new_git(self.module)
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,
@@ -38,7 +38,6 @@ class CommandCloneTestCase(CommandTestCase):
         self.module = 'rpms/module1'
         self.make_new_git(self.module)
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,
@@ -59,7 +58,6 @@ class CommandCloneTestCase(CommandTestCase):
 
         altpath = tempfile.mkdtemp(prefix='rpkg-tests.')
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,
@@ -79,7 +77,6 @@ class CommandCloneTestCase(CommandTestCase):
         self.make_new_git(self.module,
                           branches=['rpkg-tests-1', 'rpkg-tests-2'])
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,
@@ -94,7 +91,6 @@ class CommandCloneTestCase(CommandTestCase):
     def test_clone_anonymous_with_bare_dir(self):
         self.make_new_git(self.module)
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,
@@ -111,7 +107,6 @@ class CommandCloneTestCase(CommandTestCase):
         self.base_module = 'module1'
         self.make_new_git(self.module)
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,
@@ -130,7 +125,6 @@ class CommandCloneTestCase(CommandTestCase):
         self.make_new_git(self.module,
                           branches=['rpkg-tests-1', 'rpkg-tests-2'])
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,
@@ -146,7 +140,6 @@ class CommandCloneTestCase(CommandTestCase):
         self.make_new_git(self.module,
                           branches=['rpkg-tests-1', 'rpkg-tests-2'])
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,
@@ -164,7 +157,6 @@ class CommandCloneTestCase(CommandTestCase):
         self.make_new_git(self.module,
                           branches=['rpkg-tests-1', 'rpkg-tests-2'])
 
-        import pyrpkg
         cmd = pyrpkg.Commands(self.path, self.lookaside, self.lookasidehash,
                               self.lookaside_cgi, self.gitbaseurl,
                               self.anongiturl, self.branchre, self.kojiprofile,

