<commit_before>from unittest import TestCase
from gfsad import create_app, db, limiter


class TestTiles(TestCase):
    app = None

    def setUp(self):
        self.app = TestTiles.app
        with self.app.app_context():
            limiter.enabled = False
            db.create_all()

    def tearDown(self):
        with self.app.app_context():
            db.session.remove()
            db.drop_all()

    @classmethod
    def setUpClass(cls):
        super(TestTiles, cls).setUpClass()
        cls.app = create_app('Testing')
        with cls.app.app_context():
            db.create_all()

    # def test_get_tile(self):
    #     with self.app.test_client() as c:
    #         r = c.get('/tiles/ndvi_landsat_7/1555/3228/13')
    #         self.assertEqual(r.status_code, 200)
    #
    #         r = c.get('/tiles/ndvi_landsat_7/1555/3001/13')
    #         self.assertEqual(r.status_code, 200)<commit_msg>added test for tiles back<commit_after>from unittest import TestCase
from gfsad import create_app, db, limiter


class TestTiles(TestCase):
    app = None

    def setUp(self):
        self.app = TestTiles.app
        with self.app.app_context():
            limiter.enabled = False
            db.create_all()

    def tearDown(self):
        with self.app.app_context():
            db.session.remove()
            db.drop_all()

    @classmethod
    def setUpClass(cls):
        super(TestTiles, cls).setUpClass()
        cls.app = create_app('Testing')
        with cls.app.app_context():
            db.create_all()

    def test_get_tile(self):
        with self.app.test_client() as c:
            r = c.get('/tiles/ndvi_landsat_7/1555/3228/13')
            self.assertEqual(r.status_code, 200)

            r = c.get('/tiles/ndvi_landsat_7/1555/3001/13')
            self.assertEqual(r.status_code, 200)
{'fraction_non_alphanumeric': 0.11767925561029009, 'fraction_numerical': 0.03065134099616858, 'mean_word_length': 2.103565365025467, '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': '469073', 'n_tokens_mistral': 640, 'n_tokens_neox': 599, 'n_words': 109}