Ejemplo n.º 1
0
class patchTest(unittest.TestCase):
	def setUp(self):
		self.DSN = 'https://fish1.wilddogio.com'
		self.wilddog = WilddogApplication(self.DSN, None)
		WilddogPythonDataPrepare.dataPrepare()
	def test_patch(self):
		result1 = self.wilddog.patch('/e', {'e2':'e2'}, params=None, headers=None, connection=None)
		result2 = self.wilddog.patch('/e', {'e3': 11}, params=None, headers=None, connection=None)
		result3 = self.wilddog.patch('/e', {'e4': False}, params=None, headers=None, connection=None)
		result4 = self.wilddog.patch('/e', {'e5': '矩阵'}, params=None, headers=None, connection=None)
		result5 = self.wilddog.patch('/e', {'e6': None}, params=None, headers=None, connection=None)
Ejemplo n.º 2
0
class postTest(unittest.TestCase):
    def setUp(self):
        self.DSN = "https://fish1.wilddogio.com"
        self.wilddog = WilddogApplication(self.DSN, None)
        WilddogPythonDataPrepare.dataPrepare()

    def test_post(self):
        result1 = self.wilddog.post("/g", "juzhen", params=None, headers=None, connection=None)
        result2 = self.wilddog.post("/g", True, params=None, headers=None, connection=None)
        result3 = self.wilddog.post("/g", 1, params=None, headers=None, connection=None)
        result4 = self.wilddog.post("/g", "矩阵", params=None, headers=None, connection=None)
        result5 = self.wilddog.post("/g", None, params=None, headers=None, connection=None)
Ejemplo n.º 3
0
class putTest(unittest.TestCase):
	def setUp(self):
		self.DSN = 'https://fish1.wilddogio.com'
		self.wilddog = WilddogApplication(self.DSN, None)
		WilddogPythonDataPrepare.dataPrepare()
	def test_put(self):
		result1 = self.wilddog.put('/','sa', {'a':'a'},params=None, headers=None, connection=None) #无中生有
		print result1
		result2 = self.wilddog.put('/','a','lol',params=None, headers=None, connection=None) #改变已有值
		print result2
		result3 = self.wilddog.put('/f','f1', {},params=None, headers=None, connection=None) #赋空值{}相当于删除
		print result3
		result4 = self.wilddog.put('/f','f2', None,params=None, headers=None, connection=None) #赋None 没影响
		print result4
Ejemplo n.º 4
0
class deleteTest(unittest.TestCase):
	def setUp(self):
		self.DSN = 'https://fish1.wilddogio.com'
		self.wilddog = WilddogApplication(self.DSN, None)
		WilddogPythonDataPrepare.dataPrepare()
	def test_delete(self):
		result1 = self.wilddog.delete('/', 'a', params=None, headers=None, connection=None)
		print result1
		result2 = self.wilddog.delete('/', 'k', params=None, headers=None, connection=None)
		print result2
		result3 = self.wilddog.delete('/e', 'e1', params=None, headers=None, connection=None)
		print result3
		result4 = self.wilddog.delete('/f', 'f1', params=None, headers=None, connection=None)
		print result4
		result5 = self.wilddog.delete('/f/f4', 'f2', params=None, headers=None, connection=None)
		print result5
		result6 = self.wilddog.delete('/',None, params=None, headers=None, connection=None)
		print result6
Ejemplo n.º 5
0
	def setUp(self):
		self.DSN = 'https://fish1.wilddogio.com'
		self.wilddog = WilddogApplication(self.DSN, None)
		WilddogPythonDataPrepare.dataPrepare()
def dataPrepare():
	wilddog = WilddogApplication('https://fish1.wilddogio.com',None)
	result = wilddog.put('/','/',{'a':'a','b':'b','c':'c','d':'d','e':{'e1':1,'e2':2},'f':{'f1':{'name':'zidane','age':42,'retire':True,'chineseName':'齐达内'},'f2':{'name':'messi','age':27,'retire':False,'chineseName':'梅西'}}}, params=None, headers=None, connection=None)