<commit_before>import json
import unittest

import app as sourceapi

WORKING_SERVER = '172.16.31.10:21300'
NOT_WORKING_SERVER = 'fap.no:1337'


def create_payload(server):
    return dict(
        data=server
    )


class SourceAPITestCase(unittest.TestCase):

    def setUp(self):
        self.app = sourceapi.app.test_client()

    def tearDown(self):
        pass

    def test_logic(self):
        self.assertEqual(1, 1)

    def fail(self):
        self.assertEqual(1, 2)

    def test_json_response_for_all_routes_v1_with_working_server(self):
        routes = (<commit_msg>tests with database<commit_after>import json
import unittest

import app as sourceapi

WORKING_SERVER = '172.16.31.10:21300'
NOT_WORKING_SERVER = 'fap.no:1337'


def create_payload(server):
    return dict(
        data=server
    )


class SourceAPITestCase(unittest.TestCase):

    def setUp(self):
        with sourceapi.app.app_context():
            sourceapi.db.create_all()
        self.app = sourceapi.app.test_client()

    def tearDown(self):
        pass

    def test_logic(self):
        self.assertEqual(1, 1)

    def fail(self):
        self.assertEqual(1, 2)

    def test_json_response_for_all_routes_v1_with_working_server(self):
        routes = (
{'fraction_non_alphanumeric': 0.09695512820512821, 'fraction_numerical': 0.03685897435897436, 'mean_word_length': 3.0551948051948052, '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': '1501253', 'n_tokens_mistral': 454, 'n_tokens_neox': 416, 'n_words': 79}