Эх сурвалжийг харах

[web] Add .py to defaultTextExtensions

GitOrigin-RevId: 0880c01f6e3b4267f6cb790a44c6094738ab2229
Domagoj Kriskovic 5 сар өмнө
parent
commit
117a783f21

+ 1 - 0
services/web/config/settings.defaults.js

@@ -55,6 +55,7 @@ const defaultTextExtensions = [
   'ldf',
   'rmd',
   'lua',
+  'py',
   'gv',
   'mf',
   'yml',

+ 3 - 3
services/web/test/unit/src/Uploads/FileTypeManager.test.mjs

@@ -337,7 +337,7 @@ describe('FileTypeManager', function () {
 
       it('should recognise new binary files as binary', async function (ctx) {
         const { binary } = await ctx.FileTypeManager.promises.getType(
-          '/file.py',
+          '/file.eps',
           'latin1.tex',
           null
         )
@@ -347,7 +347,7 @@ describe('FileTypeManager', function () {
 
       it('should recognise existing binary files as binary', async function (ctx) {
         const { binary } = await ctx.FileTypeManager.promises.getType(
-          '/file.py',
+          '/file.eps',
           'latin1.tex',
           'file'
         )
@@ -357,7 +357,7 @@ describe('FileTypeManager', function () {
 
       it('should preserve existing non-binary files as non-binary', async function (ctx) {
         const { binary } = await ctx.FileTypeManager.promises.getType(
-          '/file.py',
+          '/file.eps',
           'latin1.tex',
           'doc'
         )