Exemplo n.º 1
0
    def test_my_setting_page_check(self, username='******', password=1):
        body1 = {
            "serviceRequest": {
                "header": HEADER1,
                "body": {
                    "userName": username,
                    "password": password
                }
            }
        }

        result = connect_and_send_requests(ServiceRequestMethod.POST,
                                           ServiceURLs.LOGIN_SERVICE_URL,
                                           body1)
        token = result[0]
        sessionId = result[1]

        body2 = {
            "serviceRequest": {
                "header": HEADER2,
                "body": {
                    "countrycode": "CN",
                    "partnercode": "Cool",
                    "token": token,
                    "sessionId": sessionId,
                    "siteversion": "development",
                    "dataStore": "us1"
                }
            }
        }
        print body2
        connect_and_send_requests(ServiceRequestMethod.POST,
                                  ServiceURLs.MY_SETTING_SERVICE_URL, body2)
Exemplo n.º 2
0
    def test_my_setting_page_check(self, username='******', password=1):
        body1 = {
            "serviceRequest": {
                "header": HEADER1,
                "body": {
                    "userName": username,
                    "password": password
                }
            }
        }

        result = connect_and_send_requests(ServiceRequestMethod.POST, ServiceURLs.LOGIN_SERVICE_URL, body1)
        token = result[0]
        sessionId = result[1]

        body2 = {
            "serviceRequest": {
                "header": HEADER2,
                "body": {
                    "countrycode": "CN",
                    "partnercode": "Cool",
                    "token": token,
                    "sessionId": sessionId,
                    "siteversion": "development",
                    "dataStore": "us1"
                }
            }
        }
        print body2
        connect_and_send_requests(ServiceRequestMethod.POST, ServiceURLs.MY_SETTING_SERVICE_URL, body2)
Exemplo n.º 3
0
    def test_login_with_valid_account(self, username='******', password='******'):
        body = {
            "serviceRequest": {
                "header": HEADER1,
                "body": {
                    "userName": username,
                    "password": password
                }
            }
        }

        connect_and_send_requests(ServiceRequestMethod.POST, ServiceURLs.LOGIN_SERVICE_URL, body)
Exemplo n.º 4
0
    def test_login_with_expired_account(self,
                                        username='******',
                                        password='******'):
        body = {
            "serviceRequest": {
                "header": HEADER1,
                "body": {
                    "userName": username,
                    "password": password
                }
            }
        }

        connect_and_send_requests(ServiceRequestMethod.POST,
                                  ServiceURLs.LOGIN_SERVICE_URL, body)