<commit_before>import unittest
import json

from rest_api import RestAPI


# Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.1

class RestAPITest(unittest.TestCase):
    def test_no_users(self):
        database = {"users": []}
        api = RestAPI(database)
        response = api.get('/users')
        self.assertDictEqual(json.loads(response), database)

    def test_add_user(self):
        database = {"users": []}<commit_msg>rest-api: update tests to v1.0.2 (#1561)<commit_after>import unittest
import json

from rest_api import RestAPI


# Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.2

class RestAPITest(unittest.TestCase):
    def test_no_users(self):
        database = {"users": []}
        api = RestAPI(database)
        response = api.get('/users')
        self.assertDictEqual(json.loads(response), database)

    def test_add_user(self):
        database = {"users": []}
{'fraction_non_alphanumeric': 0.1288604898828541, 'fraction_numerical': 0.013844515441959531, 'mean_word_length': 3.4549763033175354, 'pattern_counts': {'":': 4, '<': 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': '6627863', 'n_tokens_mistral': 300, 'n_tokens_neox': 288, 'n_words': 63}