Skip to content

Instantly share code, notes, and snippets.

@pmyjavec
Created April 2, 2013 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmyjavec/5290436 to your computer and use it in GitHub Desktop.
Save pmyjavec/5290436 to your computer and use it in GitHub Desktop.
def test_sync(self):
mock = MagicMock(return_value=True)
with mock.patch("subprocess.call", mock):
site.sync(self.config, "site1", "development")
mock.assert_called_with(["rsync", "-an", "/tmp", "/var/tmp"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment