<commit_before>import steerclear
import unittest

class SteerClearTestCase(unittest.TestCase):
	def setUp(self):
		steerclear.app.config['TESTING'] = True
		self.app = steerclear.app.test_client()

	def test_heartbeat(self):
		response = self.app.get('/')
		self.assertEquals(response.status, "200 OK")
		self.assertEquals(response.data, "pulse")<commit_msg>setup test database and wrote test for listing rides<commit_after>from steerclear import app, db
from steerclear.models import *
import unittest, tempfile, json

class SteerClearTestCase(unittest.TestCase):
	def setUp(self):
		_, db_abs_path = tempfile.mkstemp()
		app.config['TESTING'] = True
		app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
		self.client = app.test_client()
		db.create_all()

	def tearDown(self):
		db.session.remove()
		db.drop_all()

	def test_heartbeat(self):
		response = self.client.get('/')
		self.assertEquals(response.status_code, 200)
		self.assertEquals(response.data, "pulse")

	def test_list_rides(self):
		response = self.client.get('/rides')
		self.assertEquals(response.status_code, 200)
		self.assertEquals(json.loads(response.data), {"rides": []})

{'fraction_non_alphanumeric': 0.13867355727820843, 'fraction_numerical': 0.007751937984496124, 'mean_word_length': 5.4916201117318435, 'pattern_counts': {'":': 1, '<': 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': '613208', 'n_tokens_mistral': 419, 'n_tokens_neox': 384, 'n_words': 73}