<commit_before>import json

from scuevals_api.models import db, Major
from tests import TestCase


class MajorsTestCase(TestCase):
    def test_majors(self):
        with self.app.app_context():
            db.session.add(Major(id=1, university_id=1, name='Major1'))
            db.session.add(Major(id=2, university_id=1, name='Major2'))
            db.session.commit()

        headers = {'Authorization': 'Bearer ' + self.jwt}

        rv = self.client.get('/majors', headers=headers)

        self.assertEqual(rv.status_code, 200)

        data = json.loads(rv.data)
        self.assertEqual(len(data), 2)

    def test_post(self):<commit_msg>Fix majors test<commit_after>import json

from scuevals_api.models import db, Major
from tests import TestCase


class MajorsTestCase(TestCase):
    def test_majors(self):
        rv = self.client.get('/majors', headers=self.head_auth)

        self.assertEqual(200, rv.status_code)

        data = json.loads(rv.data)
        self.assertEqual(1, len(data))

    def test_post(self):
{'fraction_non_alphanumeric': 0.12233009708737864, 'fraction_numerical': 0.013592233009708738, 'mean_word_length': 3.174089068825911, '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': '1185740', 'n_tokens_mistral': 345, 'n_tokens_neox': 325, 'n_words': 66}