<commit_before>import pytest
import ../__init__ as init
from selenium import webdriver

LOCAL_INSTANCE =  "127.0.0.1:5000"


def test_is_running():
    init.is_running()
    
    # Firefox 
    driver = webdriver.Firefox()
    driver.get(LOCAl_INSTANCE)
    
    assert driver.body == "Flask is running"
    
    <commit_msg>Switch to flask built in tests<commit_after>import pytest
import rename_fotos as rfapp


LOCAL_INSTANCE =  "127.0.0.1:5000"

@pytest.fixture
def client():
    rfapp.app.config['TESTING'] = True

    with rfapp.app.test_client() as client:
        with rfapp.app.app_context():
            rfapp.init_db()
        yield client
     

def test_is_running(client):
    response = client.get('/')
    
    assert "FAIL" in response.data
    
{'fraction_non_alphanumeric': 0.10498687664041995, 'fraction_numerical': 0.026246719160104987, 'mean_word_length': 2.815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5512215', 'n_tokens_mistral': 277, 'n_tokens_neox': 261, 'n_words': 59}