<commit_before><commit_msg>Create integration test<commit_after>import requests
import os
import signal
import subprocess
import time
from homer import BOUNTYFUNDING_HOME


def setup():
	global bountyfunding_process
	print("Starting BountyFunding API...")
	bountyfunding_process = subprocess.Popen(
		["python", "src/bountyfunding_api.py"], cwd=BOUNTYFUNDING_HOME, 
		preexec_fn=os.setsid
	)
	time.sleep(2)	

def teardown():
	global bountyfunding_process
	print("Stopping BountyFunding API...")
	# Based on http://stackoverflow.com/a/4791612/1106546, won't work on Windows
	os.killpg(bountyfunding_process.pid, signal.SIGKILL)


def test():
	r = requests.get("http://localhost:5000/issue/1")
	assert(r.status_code == 200)

{'fraction_non_alphanumeric': 0.1149584487534626, 'fraction_numerical': 0.03185595567867036, 'mean_word_length': 5.820754716981132, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '4985675', 'n_tokens_mistral': 285, 'n_tokens_neox': 250, 'n_words': 52}