# Path: harnas/contest/models.py
# class Contest(models.Model):
#     class Meta:
# class News(models.Model):
#     class Meta:
# class Task(models.Model):
#     class Meta:
# class TaskFilesDirectoryError(Exception):
# class TestCase(models.Model):
# class GroupTaskDetails(models.Model):
#     class Meta:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def display_name(self):
# def make_directory_for_task_files(sender, instance, **kwargs):
# def fetch_task_files(task_dir: str, source_task_id: int) -> None:
# def make_task_dir(task_dir: str) -> None:
#     def __str__(self):
#     QUEUED = "QUE"
#     MEMORY_LIMIT = "MEM"
#     TIME_LIMIT = "TLE"
#     ACCEPTED = "OK"
#     INTERNAL_ERROR = "INT"
#     WRONG_ANSWER = "ANS"
#     COMPILATION_ERROR = "CME"
#     RUNTIME_ERROR = "RTE"
#     STATUS_CHOICES = (
#         (QUEUED, "In checking queue"),
#         (MEMORY_LIMIT, "Memory limit exceeded"),
#         (TIME_LIMIT, "Time limit exceeded"),
#         (ACCEPTED, "Accepted"),
#         (INTERNAL_ERROR, "Internal error"),
#         (WRONG_ANSWER, "Wrong answer"),
#         (COMPILATION_ERROR, "Compilation error"),
#         (RUNTIME_ERROR, "Runtime error"),
#     )


from django.test import TestCase
from harnas.contest.models import Contest, News, Task, TestEnvironment
from mock import Mock


class ContestTest(TestCase):

    def test_contest_str(self):
        contest = Mock(spec=Contest)
        contest.name = "Test"
        self.assertEqual(Contest.__str__(contest), "Test")


class NewsTest(TestCase):

    def test_news_str(self):
        news = Mock(spec=News)
        news.title = "Test news"

# Path: harnas/contest/models.py
# class Contest(models.Model):
#     class Meta:
# class News(models.Model):
#     class Meta:
# class Task(models.Model):
#     class Meta:
# class TaskFilesDirectoryError(Exception):
# class TestCase(models.Model):
# class GroupTaskDetails(models.Model):
#     class Meta:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def display_name(self):
# def make_directory_for_task_files(sender, instance, **kwargs):
# def fetch_task_files(task_dir: str, source_task_id: int) -> None:
# def make_task_dir(task_dir: str) -> None:
#     def __str__(self):
#     QUEUED = "QUE"
#     MEMORY_LIMIT = "MEM"
#     TIME_LIMIT = "TLE"
#     ACCEPTED = "OK"
#     INTERNAL_ERROR = "INT"
#     WRONG_ANSWER = "ANS"
#     COMPILATION_ERROR = "CME"
#     RUNTIME_ERROR = "RTE"
#     STATUS_CHOICES = (
#         (QUEUED, "In checking queue"),
#         (MEMORY_LIMIT, "Memory limit exceeded"),
#         (TIME_LIMIT, "Time limit exceeded"),
#         (ACCEPTED, "Accepted"),
#         (INTERNAL_ERROR, "Internal error"),
#         (WRONG_ANSWER, "Wrong answer"),
#         (COMPILATION_ERROR, "Compilation error"),
#         (RUNTIME_ERROR, "Runtime error"),
#     )


# Path: harnas/contest/tests/test_models.py
from django.test import TestCase
from harnas.contest.models import Contest, News, Task, TestEnvironment
from mock import Mock



class ContestTest(TestCase):

    def test_contest_str(self):
        contest = Mock(spec=Contest)
        contest.name = "Test"
        self.assertEqual(Contest.__str__(contest), "Test")


class NewsTest(TestCase):

    def test_news_str(self):
        news = Mock(spec=News)
        news.title = "Test news"

        self.assertEqual(News.__str__(news), "Test news")