def test_export(self): with mock.patch("subprocess.check_output") as check_output: export() cmd = [ "mysqldump", "-u", "root", "--quick", "--all-databases", "--compact" ] check_output.assert_called_with(cmd, stderr=subprocess.STDOUT)
def test_export(self): with mock.patch("subprocess.check_output") as check_output: export() cmd = ["mysqldump", "-u", "root", "--quick", "--all-databases", "--compact"] check_output.assert_called_with(cmd, stderr=subprocess.STDOUT)
def handle_noargs(self, **options): data = export() self.send_data(data) return u"Successfully exported!"