from django.http import QueryDict
from django.test import tag
from resources.generators.TreasureIslandResourceGenerator import TreasureIslandResourceGenerator
from tests.resources.generators.utils import BaseGeneratorTest


@tag("resource")
class TreasureIslandResourceGeneratorTest(BaseGeneratorTest):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.language = "en"
        self.base_valid_query = QueryDict("type=map&paper_size=a4")

    def test_type_values(self):
        generator = TreasureIslandResourceGenerator(self.base_valid_query)
        self.run_parameter_smoke_tests(generator, "type")

    def test_subtitle_map_a4(self):
        query = QueryDict("type=map&paper_size=a4")
        generator = TreasureIslandResourceGenerator(query)
        self.assertEqual(
            generator.subtitle,
            "Student map - a4"
        )

    def test_subtitle_map_letter(self):
        query = QueryDict("type=map&paper_size=letter")
        generator = TreasureIslandResourceGenerator(query)
        self.assertEqual(
            generator.subtitle,
            "Island posters - letter"
        )

    def test_subtitle_islands_a4(self):
        query = QueryDict("type=islands&paper_size=a4")
        generator = TreasureIslandResourceGenerator(query)
        self.assertEqual(
            generator.subtitle,
            "Student map - a4"
        )

    def test_subtitle_islands_letter(self):
        query = QueryDict("type=islands&paper_size=letter")
        generator = TreasureIslandResourceGenerator(query)
        self.assertEqual(
            generator.subtitle,
            "Island posters - letter"
        )

@@ -1113,38 +1113,35 @@
            %22
-Island posters
+Student map
  - letter%22%0A 
@@ -1220,33 +1220,32 @@
 ict(%22type=island
-s
 &paper_size=a4%22)
@@ -1371,35 +1371,38 @@
            %22
-Student map
+Island posters
  - a4%22%0A     
@@ -1443,32 +1443,32 @@
 s_letter(self):%0A
+
         query = 
@@ -1489,17 +1489,16 @@
 e=island
-s
 &paper_s

Update tests