]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
removed fudge and unneeded asserts 373/head
authorAndrew Schoen <aschoen@redhat.com>
Wed, 3 Dec 2014 19:16:23 +0000 (13:16 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 3 Dec 2014 19:16:23 +0000 (13:16 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
teuthology/orchestra/test/test_cluster.py

index dcc5c697a2aabbd33524d80277ccdd3e77a71c2a..8f1a23f69d2b7ff1b77cc3060df304d970e9c502 100644 (file)
@@ -208,11 +208,9 @@ class TestCluster(object):
         c_foo = c.exclude('foo', lambda role: role.startswith('b'))
         assert c_foo.remotes == {r2: ['bar'], r3: ['foo']}
 
-    @fudge.with_fakes
     @patch("teuthology.misc.write_file")
     @patch("teuthology.misc.sudo_write_file")
     def test_write_file(self, m_sudo_write_file, m_write_file):
-        fudge.clear_expectations()
         r1 = remote.Remote('r1', ssh=fudge.Fake('SSH'))
         c = cluster.Cluster(
             remotes=[
@@ -220,12 +218,10 @@ class TestCluster(object):
                 ],
             )
         c.write_file("filename", "content", sudo=True)
-        assert m_sudo_write_file.called
         m_sudo_write_file.assert_called_with(r1, "filename", "content", owner=None, perms=None)
         with pytest.raises(ValueError):
             c.write_file("filename", "content", sudo=False, perms="perms")
         c.write_file("filename", "content")
-        assert m_write_file.called
         m_write_file.assert_called_with(r1, "filename", "content")