Пример #1
0
def testing8():
    result = testcase({
        "value": "Iron Man 3"
    })
    test(result['status'], -201)

    result = testcase({
        "value": "007"
    })
    test(result['status'], -201)
Пример #2
0
def testing7():
    result = testcase({
        "value": "Vigneshwaran P"
    })
    test(result['status'], 0)

    result = testcase({
        "value": "Iron Man"
    })
    test(result['status'], 0)
Пример #3
0
def testing_list6():
    result = testcase({
        "value": ["male", "Male"]
    })
    test(result['status'], -201)

    result = testcase({
        "value": ["female", "male"]
    })
    test(result['status'], -201)
Пример #4
0
def testing5():
    result = testcase({
        "value": "Male"
    })
    test(result['status'], 0)

    result = testcase({
        "value": "Female"
    })
    test(result['status'], 0)
Пример #5
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)
Пример #6
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)
Пример #7
0
def testing6():
    result = testcase({
        "value": "male"
    })
    test(result['status'], -201)

    result = testcase({
        "value": "female"
    })
    test(result['status'], -201)
Пример #8
0
def testing_list5():
    result = testcase({
        "value": ["Male", "Female"]
    })
    test(result['status'], 0)

    result = testcase({
        "value": ["Female", "Male"]
    })
    test(result['status'], 0)
Пример #9
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)
Пример #10
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)
Пример #11
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")
Пример #12
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'])
Пример #13
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")
Пример #14
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")
Пример #15
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")
Пример #16
0
def testing1():
    for i in range(0, 1000):
        result = testcase({
            "value": str(i)
        })
        test(result['status'], 0)
Пример #17
0
def fileinput():
    with open("/tmp/temp.file", "w") as f:
        f.write("Helloooo world")

    result = testcase({"value": "Vignesh rockz"}, files={"file": open("/tmp/temp.file")})
    print("INFO: Result =",result)