This commit is contained in:
Egor Matveev 2022-03-19 13:52:56 +03:00
parent 7e79595b2f
commit dd7d61e909
2 changed files with 7 additions and 19 deletions

View File

@ -1,19 +0,0 @@
from os import listdir
from SprintLib.testers.BaseTester import BaseTester, TestException
class JavaScriptTester(BaseTester):
files = None
def before_test(self):
self.files = []
for file in listdir(self.solution.testing_directory):
if file.endswith(".js"):
self.files.append(file)
if not self.files:
raise TestException("TE")
@property
def command(self):
return f"node {' '.join(self.files)}"

View File

@ -18,3 +18,10 @@ class Command(BaseCommand):
obj, _ = LanguageApply.objects.get_or_create(language_id=language.id)
obj.applied = True
obj.save()
language_ids = [language.id for language in languages]
for apply in LanguageApply.objects.all():
if apply.language_id not in language_ids:
for s in Set.objects.filter(languages__in=apply.language_id):
s.languages.remove(apply.language_id)
s.save()
apply.delete()