Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 def handle_noargs(self, **options):
     data = export()
     self.send_data(data)
     return u"Successfully exported!"