mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-21 23:01:52 +00:00
testsuite passes - Area removed
This commit is contained in:
parent
ab79a43afa
commit
2f6017d6d3
@ -7,7 +7,7 @@ from http import HTTPStatus
|
||||
|
||||
from django.test import Client, TestCase
|
||||
|
||||
from troggle.core.models.caves import Area, Cave
|
||||
from troggle.core.models.caves import Cave
|
||||
from troggle.core.models.troggle import Person, PersonExpedition
|
||||
|
||||
# import troggle.settings as settings
|
||||
@ -18,7 +18,7 @@ class FixtureTests(TestCase):
|
||||
They do not exercise the GET and url functions
|
||||
"""
|
||||
|
||||
fixtures = ["auth_users", "expo_areas", "expo_caves", "expo_exped"]
|
||||
fixtures = ["auth_users", "expo_caves", "expo_exped"]
|
||||
ph = r"and leads in 800m of tortuous going to"
|
||||
|
||||
def setUp(self):
|
||||
@ -36,15 +36,12 @@ class FixtureTests(TestCase):
|
||||
self.assertEqual(str(pe.person.fullname), "Michael Sargent")
|
||||
self.assertEqual(str(pe.expedition.year), "2019")
|
||||
|
||||
def test_fix_area_loaded(self):
|
||||
a = Area.objects.get(short_name="1623")
|
||||
self.assertEqual(str(a.short_name), "1623")
|
||||
|
||||
def test_fix_cave_loaded115(self):
|
||||
c = Cave.objects.get(kataster_number="115")
|
||||
self.assertEqual(str(c.description_file), "1623/115.htm")
|
||||
self.assertEqual(str(c.url), "1623/115.url") # intentional
|
||||
self.assertEqual(str(c.filename), "1623-115.html")
|
||||
self.assertEqual(str(c.areacode), "1623")
|
||||
|
||||
# c.area is a 'ManyRelatedManager' object and not iterable
|
||||
# self.assertEqual(str(c.[0].short_name), "1623")
|
||||
@ -82,7 +79,7 @@ class FixturePageTests(TestCase):
|
||||
"""
|
||||
|
||||
# The fixtures have a password hash which is compatible with plain-text password 'secretword'
|
||||
fixtures = ["auth_users", "expo_areas", "expo_caves", "expo_exped"]
|
||||
fixtures = ["auth_users", "expo_caves", "expo_exped"]
|
||||
ph = r"and leads in 800m of tortuous going to"
|
||||
|
||||
@classmethod
|
||||
|
@ -84,7 +84,7 @@ class SimpleTest(SimpleTestCase):
|
||||
|
||||
import troggle.core.views.expo
|
||||
from troggle.core.forms import CaveAndEntranceFormSet, CaveForm, EntranceForm, EntranceLetterForm
|
||||
from troggle.core.models.caves import Area, Cave, CaveAndEntrance, Entrance, SurvexStation #EntranceSlug,
|
||||
from troggle.core.models.caves import Cave, CaveAndEntrance, Entrance, SurvexStation #EntranceSlug,
|
||||
from troggle.core.models.troggle import Expedition
|
||||
from troggle.core.views.auth import login_required_if_public
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
[
|
||||
{"model": "core.area", "pk": 25, "fields":
|
||||
{"short_name": "1626 or 6 (borderline)", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 24, "fields":
|
||||
{"short_name": "8a", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 23, "fields":
|
||||
{"short_name": "2b or 4 (unclear)", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 22, "fields":
|
||||
{"short_name": "11", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 21, "fields":
|
||||
{"short_name": "3", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 20, "fields":
|
||||
{"short_name": "4", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 19, "fields":
|
||||
{"short_name": "1b", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 18, "fields":
|
||||
{"short_name": "8b", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 17, "fields":
|
||||
{"short_name": "2d", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 16, "fields":
|
||||
{"short_name": "7", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 15, "fields":
|
||||
{"short_name": "2b", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 14, "fields":
|
||||
{"short_name": "8c", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 13, "fields":
|
||||
{"short_name": "2c", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 12, "fields":
|
||||
{"short_name": "8d", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 11, "fields":
|
||||
{"short_name": "", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 10, "fields":
|
||||
{"short_name": "5", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 9, "fields":
|
||||
{"short_name": "6", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 8, "fields":
|
||||
{"short_name": "2a", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 7, "fields":
|
||||
{"short_name": "1c", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 6, "fields":
|
||||
{"short_name": "1d", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 5, "fields":
|
||||
{"short_name": "1a", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 4, "fields":
|
||||
{"short_name": "9", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 3, "fields":
|
||||
{"short_name": "10", "name": null, "description": null, "super": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 2, "fields":
|
||||
{"short_name": "1626", "name": null, "description": null, "super": null, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 1, "fields":
|
||||
{"short_name": "1623", "name": null, "description": null, "super": null, "new_since_parsing": false, "non_public": false}}
|
||||
]
|
@ -16,7 +16,7 @@
|
||||
"description_file": "1623/115.htm",
|
||||
"url": "1623/115.url",
|
||||
"filename": "1623-115.html",
|
||||
"area": [1, 8]}},
|
||||
"areacode": "1623"}},
|
||||
|
||||
{"model": "core.cave", "pk": 350, "fields":
|
||||
{"new_since_parsing": false, "non_public": false,
|
||||
@ -36,5 +36,5 @@
|
||||
"description_file": "",
|
||||
"url": "1623/284/284.html",
|
||||
"filename": "1623-284.html",
|
||||
"area": [1, 11]}}
|
||||
"areacode": "1623"}}
|
||||
]
|
Loading…
Reference in New Issue
Block a user