<commit_before><commit_msg>Test module : some test sinario added<commit_after>import requests
import json

CLOUD_END_POINT = "http://172.16.58.3:5000"

def test_IsHomePageWorking():
    homePageRequest = requests.get(CLOUD_END_POINT)
    assert homePageRequest.text == "Hello world"

def test_UploadTestData():
    testUploadData = {
        "Data": [20.0, 30.0, 401.0, 50.0, 60.0],
        "Date": ["2017-08-11", "2017-08-12", "2017-08-13", "2017-08-14", "2017-08-15"],
        "Day": 4
    }
    uploadTestDataRequest = requests.post(CLOUD_END_POINT + "/upload/", json=testUploadData)

    serverResponse = json.loads(uploadTestDataRequest.text)
    assert serverResponse["Result"] >= 0, "Wrong process id returned"
    return

def test_DownloadWorkingForecastData():
    testUploadData = {
        "ProcessId": 9
    }
    uploadTestDataRequest = requests.post(CLOUD_END_POINT + "/forecast/", json=testUploadData)

    serverResponse = json.loads(uploadTestDataRequest.text)
    assert serverResponse["Status"] == "Working", "Is it really process done?"

def test_DownloadDoneForecastData():
    testUploadData = {
        "ProcessId": 2
    }
    uploadTestDataRequest = requests.post(CLOUD_END_POINT + "/forecast/", json=testUploadData)

    serverResponse = json.loads(uploadTestDataRequest.text)
    assert serverResponse["Status"] == "Done", "That process id must return status done"
{'fraction_non_alphanumeric': 0.13012221423436376, 'fraction_numerical': 0.05176132278936017, 'mean_word_length': 4.117647058823529, 'pattern_counts': {'":': 5, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6464551', 'n_tokens_mistral': 484, 'n_tokens_neox': 439, 'n_words': 90}