Merge branch 'restapi' of github.com:CyberDem0n/governor into features/refactoring

Conflicts:
	tests/test_postgresql.py
This commit is contained in:
Alexander Kukushkin
2015-05-27 11:15:15 +02:00
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -1,14 +1,15 @@
import os
import psycopg2
import unittest
import requests
import subprocess
import sys
import time
import unittest
import yaml
from governor import Governor, main, sigchld_handler, sigterm_handler
from test_ha import true, false
from test_postgresql import Postgresql, os_system, psycopg2_connect
from test_postgresql import Postgresql, subprocess_call, psycopg2_connect
from test_etcd import requests_get, requests_put, requests_delete
if sys.hexversion >= 0x03000000:
@@ -38,7 +39,7 @@ class TestGovernor(unittest.TestCase):
def set_up(self):
self.touched = False
os.system = os_system
subprocess.call = subprocess_call
psycopg2.connect = psycopg2_connect
requests.get = requests_get
requests.put = requests_put
+4 -3
View File
@@ -3,8 +3,9 @@
import os
import psycopg2
import unittest
import shutil
import subprocess
import unittest
from helpers.etcd import Cluster, Member
from helpers.postgresql import Postgresql
@@ -14,7 +15,7 @@ def nop(*args, **kwargs):
pass
def os_system(cmd):
def subprocess_call(cmd, shell=False):
return 0
@@ -107,7 +108,7 @@ class TestPostgresql(unittest.TestCase):
super(TestPostgresql, self).__init__(method_name)
def set_up(self):
os.system = os_system
subprocess.call = subprocess_call
shutil.copy = nop
self.p = Postgresql({
'name': 'test0',