15 lines
549 B
Python
15 lines
549 B
Python
"""The API process no longer depends on frontend assets."""
|
|
import importlib
|
|
import unittest
|
|
|
|
web = importlib.import_module('web.app')
|
|
|
|
|
|
class ApiSeparationTests(unittest.TestCase):
|
|
def test_backend_has_no_frontend_static_route(self):
|
|
client = web.app.test_client()
|
|
self.assertIsNone(web.app.static_folder)
|
|
self.assertEqual(client.get('/').get_json()['service'], 'CADmind API')
|
|
self.assertEqual(client.get('/static/studio.js').status_code, 404)
|
|
self.assertTrue(client.get('/api/health').get_json()['ok'])
|