Example #1
0
def testing_list1():
    for i in range(0, 1000):
        result = testcase({
            "value": [i, i + 12]
        })
        test(result['status'], 0)
        print("Data : %s" % result['data'])
Example #2
0
def testing4():
    print("Testing: String value to Float")
    for i in range(0, 1000):
        result = testcase({
            "value": str(i) + "sd"
        })
        test(result['status'], -201)
    print("'String value to float' test completed successfully")
Example #3
0
def testing_list8():
    result = testcase({
        "value": ["Iron Man 3", "Iron Man 4"]
    })
    test(result['status'], -201)

    result = testcase({
        "value": ["007", "234"]
    })
    test(result['status'], -201)
Example #4
0
def testing_list7():
    result = testcase({
        "value": ["Vigneshwaran P", "P Vigneshwaran"]
    })
    test(result['status'], 0)

    result = testcase({
        "value": ["Iron Man", "Man Iron"]
    })
    test(result['status'], 0)
Example #5
0
def testing_list6():
    result = testcase({
        "value": ["male", "Male"]
    })
    test(result['status'], -201)

    result = testcase({
        "value": ["female", "male"]
    })
    test(result['status'], -201)
Example #6
0
def testing_list5():
    result = testcase({
        "value": ["Male", "Female"]
    })
    test(result['status'], 0)

    result = testcase({
        "value": ["Female", "Male"]
    })
    test(result['status'], 0)
Example #7
0
def testing8():
    result = testcase({
        "value": "Iron Man 3"
    })
    test(result['status'], -201)

    result = testcase({
        "value": "007"
    })
    test(result['status'], -201)
Example #8
0
def testing7():
    result = testcase({
        "value": "Vigneshwaran P"
    })
    test(result['status'], 0)

    result = testcase({
        "value": "Iron Man"
    })
    test(result['status'], 0)
Example #9
0
def testing6():
    result = testcase({
        "value": "male"
    })
    test(result['status'], -201)

    result = testcase({
        "value": "female"
    })
    test(result['status'], -201)
Example #10
0
def testing5():
    result = testcase({
        "value": "Male"
    })
    test(result['status'], 0)

    result = testcase({
        "value": "Female"
    })
    test(result['status'], 0)
Example #11
0
def session_max_min_check():
    for i in range(1, 4001):
        val = "x" * i
        print("Checking with session size <%s>" % i)
        result = testcase({"value": val})
        try:
            test(result['status'], 0)
        except:
            print("Working session size is <%s>" % (i-1))
            return

    print("All testcase completed successfully")
Example #12
0
def testing3():
    print("Testing with integer values")
    for i in range(0, 1000):
        result = testcase({
            "value": str(i)
        })
        test(result['status'], 0)

    print("Testing with float values")
    for i in range(0, 1000):
        result = testcase({
            "value": str(i) + ".34"
        })
        test(result['status'], 0)
Example #13
0
def session_value_check():
    old_value = None
    for i in range(1, 4000):
        val = "x" * i
        print("Checking with session size <%s>" % i)
        result = testcase({"value": val})
        try:
            test(result['data']['session'], old_value)
        except:
            print(result)
            return
        old_value = val

    print("All testcase completed successfully")
Example #14
0
def testing_list3():
    print("Testing with integer values")
    for i in range(0, 1000):
        result = testcase({
            "value": [i, i+1]
        })
        test(result['status'], 0)

    print("Testing with float values")
    for i in range(0, 1000):
        result = testcase({
            "value": [str(i) + ".34", i]
        })
        test(result['status'], 0)
Example #15
0
def testing2():
    print("Testing: String value to integer")
    for i in range(0, 1000):
        result = testcase({
            "value": str(i) + "sd"
        })
        test(result['status'], -201)
    print("'String value to integer' test completed successfully")
    print("Testing: Floating value to Integer")
    for i in range(0, 1000):
        result = testcase({
            "value": str(i) + ".01"
        })
        test(result['status'], -201)

    print("'Floating value to Integer' test completed successfully")
Example #16
0
def testing1():
    for i in range(0, 1000):
        result = testcase({
            "value": str(i)
        })
        test(result['status'], 0)