mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +00:00
home: Ignore handlebars errors in the test suite.
The handlebars error message is just for the manual development environment; this prevents the state of compiling handlebars templates from run-dev.py from potentially causing the unit tests to fail.
This commit is contained in:
@@ -75,7 +75,8 @@ def get_bot_types(user_profile: UserProfile) -> List[Dict[str, object]]:
|
||||
return bot_types
|
||||
|
||||
def home(request: HttpRequest) -> HttpResponse:
|
||||
if settings.DEVELOPMENT and os.path.exists('var/handlebars-templates/compile.error'):
|
||||
if (settings.DEVELOPMENT and not settings.TEST_SUITE and
|
||||
os.path.exists('var/handlebars-templates/compile.error')):
|
||||
response = render(request, 'zerver/handlebars_compilation_failed.html')
|
||||
response.status_code = 500
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user