Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)

Exemplo n.º 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)            
Exemplo n.º 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)            
Exemplo n.º 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)            
Exemplo n.º 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)