]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests.systemd update imports for systemd module 24958/head
authorAlfredo Deza <adeza@redhat.com>
Tue, 6 Nov 2018 14:45:08 +0000 (09:45 -0500)
committerAlfredo Deza <alfredo@deza.pe>
Tue, 6 Nov 2018 21:25:47 +0000 (16:25 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit a63a6c86a03738bf50fa71a490951343a83afff6)

src/ceph-volume/ceph_volume/tests/systemd/test_main.py

index 86a685ab515740131e6da10be034e867f43b975d..0af52e8d141c7d7a5a30a570c33645bc5494d40e 100644 (file)
@@ -1,16 +1,16 @@
 import pytest
 from ceph_volume import exceptions, conf
-from ceph_volume.systemd import main
+from ceph_volume.systemd.main import parse_subcommand, main, process
 
 
 class TestParseSubcommand(object):
 
     def test_no_subcommand_found(self):
         with pytest.raises(exceptions.SuffixParsingError):
-            main.parse_subcommand('')
+            parse_subcommand('')
 
     def test_sub_command_is_found(self):
-        result = main.parse_subcommand('lvm-1-sha-1-something-0')
+        result = parse_subcommand('lvm-1-sha-1-something-0')
         assert result == 'lvm'
 
 
@@ -33,16 +33,16 @@ class TestMain(object):
 
     def test_no_arguments_parsing_error(self):
         with pytest.raises(RuntimeError):
-            main.main(args=[])
+            main(args=[])
 
     def test_parsing_suffix_error(self):
         with pytest.raises(exceptions.SuffixParsingError):
-            main.main(args=['asdf'])
+            main(args=['asdf'])
 
     def test_correct_command(self, monkeypatch):
         run = Capture()
-        monkeypatch.setattr(main.process, 'run', run)
-        main.main(args=['ceph-volume-systemd', 'lvm-8715BEB4-15C5-49DE-BA6F-401086EC7B41-0' ])
+        monkeypatch.setattr(process, 'run', run)
+        main(args=['ceph-volume-systemd', 'lvm-8715BEB4-15C5-49DE-BA6F-401086EC7B41-0' ])
         command = run.calls[0][0]
         assert command == [
             'ceph-volume',