From dc932356f02cd6bf16c516858c94dd5db4d7c6d6 Mon Sep 17 00:00:00 2001 From: Nikhil Manchanda Date: Mon, 10 Mar 2014 17:34:16 -0700 Subject: [PATCH] Fixed backup unittests to use mocked cmd The backup unittests were using the actual cmd from the backup implementation (eg. innobackupex) instead of the faked unit test cmd. Fixed this so that calls to innobackupex are no longer being made when running the unit tests. Closes-bug: 1290290 Change-Id: I26b77efbf95feb5a32777197c7cba08f7b757c38 --- trove/tests/unittests/backup/test_backupagent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trove/tests/unittests/backup/test_backupagent.py b/trove/tests/unittests/backup/test_backupagent.py index 2cbd8689ae..9d172f64f0 100644 --- a/trove/tests/unittests/backup/test_backupagent.py +++ b/trove/tests/unittests/backup/test_backupagent.py @@ -50,6 +50,9 @@ class MockBackup(BackupRunner): self.cmd = 'echo %s' % self.data super(MockBackup, self).__init__(*args, **kwargs) + def cmd(self): + return self.cmd + class MockCheckProcessBackup(MockBackup): """Backup runner that fails confirming the process."""