Example #1
0
 def test_set_admin_pw(self):
     #        HTTP/1.1 201 Created
     #        (no content)
     self.server.expect(method='GET', url='/api$').and_return(mime_type="application/json",
                                                              file_content=test_path + "Fusion_ping_virgin_response.json")
     self.server.expect(method='POST', url='/api$', data=json.dumps({"password": "******"})).and_return(
         reply_code=201)
     self.server.expect(method='GET', url='/api$').and_return(mime_type="application/json",
                                                              file_content=test_path + "Fusion_ping_established_response.json")
     f = Fusion(**fa)
     f.set_admin_password()
     f.ping()
Example #2
0
 def test_set_admin_pw(self):
     #        HTTP/1.1 201 Created
     #        (no content)
     self.server.expect(method='GET', url='/api$').and_return(
         mime_type="application/json",
         file_content=test_path + "Fusion_ping_virgin_response.json")
     self.server.expect(method='POST',
                        url='/api$',
                        data=json.dumps({"password": "******"
                                         })).and_return(reply_code=201)
     self.server.expect(method='GET', url='/api$').and_return(
         mime_type="application/json",
         file_content=test_path + "Fusion_ping_established_response.json")
     f = Fusion(**fa)
     f.set_admin_password()
     f.ping()
Example #3
0
 def test_ping_established(self):
     self.server.expect(method='GET', url='/api$').and_return(mime_type="application/json",
                                                              file_content=test_path + "Fusion_ping_established_response.json")
     self.server.expect(method='GET', url='/api$').and_return(mime_type="application/json",
                                                              file_content=test_path + "Fusion_ping_established_response.json")
     f = Fusion(**fa)
     self.assertTrue(f.ping())
Example #4
0
 def test_ping_established(self):
     self.server.expect(method='GET', url='/api$').and_return(
         mime_type="application/json",
         file_content=test_path + "Fusion_ping_established_response.json")
     self.server.expect(method='GET', url='/api$').and_return(
         mime_type="application/json",
         file_content=test_path + "Fusion_ping_established_response.json")
     f = Fusion(**fa)
     self.assertTrue(f.ping())