Ubuntu Pastebin

Paste from csmith at Wed, 20 Sep 2017 20:34:03 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/Makefile b/Makefile
index 9e7f4ee..9d2e2af 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ unittest: clean_pyc
 	nosetests $(noseopts) tests/unittests cloudinit
 
 unittest3: clean_pyc
-	nosetests3 $(noseopts) tests/unittests
+	nosetests3 $(noseopts) tests/unittests cloudinit
 
 ci-deps-ubuntu:
 	@$(PYVER) $(CWD)/tools/read-dependencies --distro ubuntu --test-distro
diff --git a/cloudinit/net/tests/test_dhcp.py b/cloudinit/net/tests/test_dhcp.py
index 1324c3d..a38edae 100644
--- a/cloudinit/net/tests/test_dhcp.py
+++ b/cloudinit/net/tests/test_dhcp.py
@@ -107,7 +107,8 @@ class TestDHCPDiscoveryClean(CiTestCase):
              'os.getuid': 0},
             maybe_perform_dhcp_discovery)
         self.assertEqual({'address': '192.168.2.2'}, retval)
-        m_dhcp.assert_called_once()
+        self.assertEqual(
+            1, m_dhcp.call_count, 'dhcp_discovery not called once')
         call = m_dhcp.call_args_list[0]
         self.assertEqual('/sbin/dhclient', call[0][0])
         self.assertEqual('eth9', call[0][1])
diff --git a/tox.ini b/tox.ini
index 72de983..776f425 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,7 @@ envlist = py27, py3, flake8, xenial, pylint
 recreate = True
 
 [testenv]
-commands = python -m nose {posargs:tests/unittests}
+commands = python -m nose {posargs:tests/unittests cloudinit}
 setenv =
     LC_ALL = en_US.utf-8
 
Download as text