Пример #1
0
def createProductInstance(productTemplateId,
                          accountTemplateId,
                          definition,
                          contentType="text/xml"):
    testData = t_utils.getTestData(definition,
                                   substitutions={
                                       "{templateId}": productTemplateId,
                                       "{accountTemplateId}": accountTemplateId
                                   })
    return o_utils.createInstance("product", testData, contentType=contentType)
Пример #2
0
def createSubscriptionInstance(subscriptionTemplateId, userTemplateId,
                               productId, userId, shortCode, definition):
    testData = t_utils.getTestData(definition,
                                   substitutions={
                                       "{templateId}": subscriptionTemplateId,
                                       "{userTemplateId}": userTemplateId,
                                       "{productId}": productId,
                                       "{userId}": userId,
                                       "{shortCode}": shortCode
                                   })
    return o_utils.createInstance("subscription", testData)
Пример #3
0
                                   })
    return o_utils.createInstance("product", testData, contentType=contentType)


def createUserInstance(userTemplateId,
                       accountId,
                       definition,
                       case=None,
                       contentType="text/xml"):
    testData = t_utils.getTestData(definition,
                                   substitutions={
                                       "{templateId}": userTemplateId,
                                       "{accountId}": accountId
                                   },
                                   case=case)
    return o_utils.createInstance("user", testData, contentType=contentType)


def createSubscriptionInstance(subscriptionTemplateId, userTemplateId,
                               productId, userId, shortCode, definition):
    testData = t_utils.getTestData(definition,
                                   substitutions={
                                       "{templateId}": subscriptionTemplateId,
                                       "{userTemplateId}": userTemplateId,
                                       "{productId}": productId,
                                       "{userId}": userId,
                                       "{shortCode}": shortCode
                                   })
    return o_utils.createInstance("subscription", testData)

Пример #4
0
def createAccountInstance(accountTemplateId, userTemplateId, productId, subProductId1, subProductId2, userId, shortCode, definition, case=0, contentType="text/xml"):
    testData = t_utils.getTestData(definition, substitutions = {"{templateId}":accountTemplateId,"{userTemplateId}":userTemplateId,"{productId}":productId,"{eCntProductId}":subProductId1,"{eCKProductId}":subProductId2,"{userId}":userId,"{shortCode}":shortCode}, case=case)
    #print testData
    return o_utils.createInstance("account", testData, contentType=contentType)            
Пример #5
0
def createSubscriptionInstance(subscriptionTemplateId, userTemplateId, productId, userId, shortCode, definition):
    testData = t_utils.getTestData(definition, substitutions = {"{templateId}":subscriptionTemplateId,"{userTemplateId}":userTemplateId,"{productId}":productId,"{userId}":userId,"{shortCode}":shortCode})
    return o_utils.createInstance("subscription", testData)            
Пример #6
0
def createUserInstance(userTemplateId, accountId, definition, case=None, contentType="text/xml"):
    testData = t_utils.getTestData(definition, substitutions = {"{templateId}":userTemplateId, "{accountId}": accountId}, case=case)
    return o_utils.createInstance("user", testData, contentType=contentType)            
Пример #7
0
def createProductInstance(productTemplateId, accountTemplateId, definition, contentType="text/xml"):
    testData = t_utils.getTestData(definition, substitutions = {"{templateId}":productTemplateId, "{accountTemplateId}":accountTemplateId})
    return o_utils.createInstance("product", testData, contentType=contentType)