2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

bad tests.

This commit is contained in:
Philip Sargent 2023-04-06 00:57:19 +01:00
parent f15555a3bd
commit 116cfc7c6e
3 changed files with 1 additions and 272 deletions

View File

@ -1,131 +0,0 @@
<!DOCTYPE html>
<!-- base.html - this text visible because this template has been included -->
<html lang="en">
<head>
<script>document.interestCohort = null;</script> <!-- Turn off Google FLoC -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/site_media/css/trog3.css" title="troggle-style"/>
<title>Troggle Error - Bad Slug</title>
</head>
<body>
<div id="header">
<h1>CUCC Expeditions to Austria: 1976 - 2022</h1>
<div id="editLinks">
<a href="/">Home</a> |
<a id="cuccLink" href="http://camcaving.uk/">CUCC</a> |
<a id="expoWebsiteLink" href="http://expo.survex.com">expo.survex</a> |
<a id="handbook" href="/handbook/computing/onlinesystems.html">Handbook</a> |
<a href='/accounts/login/'>Log in</a>
</div>
</div>
<div class="toolbarlinks">
<a href="/survexfile/caves-1623/264/264.svx">264</a> |
<a href="/survexfile/caves-1623/290/290.svx">290</a> |
<a href="/survexfile/caves-1626/359/359.svx">359</a> |
<a href="/survexfile/">Survex</a> |
<a href="/survexfile/caves/">All Survex</a> |
<a href="/survey_scans/">Scans</a> |
<a href="/walletedit/">Upload Scans</a> |
<a href="/dwgfiles/">Drawings</a> |
<a href="/dwgupload/">Upload Drawings</a> |
<a href="/photoupload/">Upload Photos</a> |
<a href="/1623/290/290">290 (FGH)</a> |
<a href="/1623/264/264.html">264 (Balkonh&ouml;hle)</a> |
<br>
<a href="/dataissues">Data Issues</a> |
<a href="/handbook/computing/todo-data.html">tasks to do </a> |
<a id="cavesLink" href="/indxal.htm">caves</a> |
<a id="qmsLink" href="/cave/qms/1623-290">QMs</a> |
<a id="entsLink" href="/eastings">ents</a> |
<a id="folklink" href="/folk">expoers</a> |
<a id="caversLink" href="/people">survey lengths</a> |
<a href="/stats">statistics</a> |
<a href="/wallets/year/2022">Wallets(2022)</a> |
<a href="/expedition/2022">Expo(2022)</a> |
<a href="/controlpanel">Control panel</a> |
</div>
<div id="nav">
<!-- Not used any more? -->
</div>
<div id="content" >
<div id="related">
</div>
<div class='middle'>
<h2>Bad Slug Error</h2>
</div>
<div class='middle3 login'>
<div class='space'></div>
<div class='align-center'>
<h3>There has been a Troggle error. </h3>
<h4>
A Cave, Entrance or QM has been referred to using a label (a 'slug') which does not work.
<p>This is the bad slug:
<font color="red">
1623-284 - from caveQMs()
</font>
<p>
This is the previous page which had the bad slug reference on it: <font color="red">
<script type="text/javascript">
document.write(document.referrer);
</script>
</font>
</h4>
<p>
<p>It is also possible that the cave description page is being viewed using an alternative URL,
so that the local links in the page to other parts of the cave do not work.
<br>
e.g. /cave/1623-161 is not the correct way of looking at Kaninchenhohle,
<br>
you should be using <br>
/1623/161/top.htm instead.
<p>If that is the case, tell a nerd that we haven't fixed the fault that we thought we had fixed.
<div class='space'><p>&nbsp;</div>
<h3>What you should do now</h3>
<p>Please report the error by emailing the nerds at
<a href="mailto:expo-tech@lists.wookware.org">expo-tech@lists.wookware.org</a> with this information:
<ol>
<li>The bad slug text written in <font color="red">red</font> above.
<li>The previous page URL, also written in <font color="red">red</font> above
<li>Go back to this previous page <script type="text/javascript">
document.write("<a href='",document.referrer,"'>",document.referrer,"</a>");
</script>
and see if you can tell whether the bad slug was in HTML text which had been written manually, or whether it appeared to be a programming error.
</ol>
</div>
</div>
</div>
</div>
<div class="footer">
</div>
</body>
</html>

View File

@ -1,131 +0,0 @@
<!DOCTYPE html>
<!-- base.html - this text visible because this template has been included -->
<html lang="en">
<head>
<script>document.interestCohort = null;</script> <!-- Turn off Google FLoC -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/site_media/css/trog3.css" title="troggle-style"/>
<title>Troggle Error - Bad Slug</title>
</head>
<body>
<div id="header">
<h1>CUCC Expeditions to Austria: 1976 - 2022</h1>
<div id="editLinks">
<a href="/">Home</a> |
<a id="cuccLink" href="http://camcaving.uk/">CUCC</a> |
<a id="expoWebsiteLink" href="http://expo.survex.com">expo.survex</a> |
<a id="handbook" href="/handbook/computing/onlinesystems.html">Handbook</a> |
<a href='/accounts/login/'>Log in</a>
</div>
</div>
<div class="toolbarlinks">
<a href="/survexfile/caves-1623/264/264.svx">264</a> |
<a href="/survexfile/caves-1623/290/290.svx">290</a> |
<a href="/survexfile/caves-1626/359/359.svx">359</a> |
<a href="/survexfile/">Survex</a> |
<a href="/survexfile/caves/">All Survex</a> |
<a href="/survey_scans/">Scans</a> |
<a href="/walletedit/">Upload Scans</a> |
<a href="/dwgfiles/">Drawings</a> |
<a href="/dwgupload/">Upload Drawings</a> |
<a href="/photoupload/">Upload Photos</a> |
<a href="/1623/290/290">290 (FGH)</a> |
<a href="/1623/264/264.html">264 (Balkonh&ouml;hle)</a> |
<br>
<a href="/dataissues">Data Issues</a> |
<a href="/handbook/computing/todo-data.html">tasks to do </a> |
<a id="cavesLink" href="/indxal.htm">caves</a> |
<a id="qmsLink" href="/cave/qms/1623-290">QMs</a> |
<a id="entsLink" href="/eastings">ents</a> |
<a id="folklink" href="/folk">expoers</a> |
<a id="caversLink" href="/people">survey lengths</a> |
<a href="/stats">statistics</a> |
<a href="/wallets/year/2022">Wallets(2022)</a> |
<a href="/expedition/2022">Expo(2022)</a> |
<a href="/controlpanel">Control panel</a> |
</div>
<div id="nav">
<!-- Not used any more? -->
</div>
<div id="content" >
<div id="related">
</div>
<div class='middle'>
<h2>Bad Slug Error</h2>
</div>
<div class='middle3 login'>
<div class='space'></div>
<div class='align-center'>
<h3>There has been a Troggle error. </h3>
<h4>
A Cave, Entrance or QM has been referred to using a label (a 'slug') which does not work.
<p>This is the bad slug:
<font color="red">
1623-284 - from caveQMs()
</font>
<p>
This is the previous page which had the bad slug reference on it: <font color="red">
<script type="text/javascript">
document.write(document.referrer);
</script>
</font>
</h4>
<p>
<p>It is also possible that the cave description page is being viewed using an alternative URL,
so that the local links in the page to other parts of the cave do not work.
<br>
e.g. /cave/1623-161 is not the correct way of looking at Kaninchenhohle,
<br>
you should be using <br>
/1623/161/top.htm instead.
<p>If that is the case, tell a nerd that we haven't fixed the fault that we thought we had fixed.
<div class='space'><p>&nbsp;</div>
<h3>What you should do now</h3>
<p>Please report the error by emailing the nerds at
<a href="mailto:expo-tech@lists.wookware.org">expo-tech@lists.wookware.org</a> with this information:
<ol>
<li>The bad slug text written in <font color="red">red</font> above.
<li>The previous page URL, also written in <font color="red">red</font> above
<li>Go back to this previous page <script type="text/javascript">
document.write("<a href='",document.referrer,"'>",document.referrer,"</a>");
</script>
and see if you can tell whether the bad slug was in HTML text which had been written manually, or whether it appeared to be a programming error.
</ol>
</div>
</div>
</div>
</div>
<div class="footer">
</div>
</body>
</html>

View File

@ -189,16 +189,7 @@ class FixturePageTests(TestCase):
# f.write(content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")
def test_fix_cavehtml284(self):
response = self.client.get("/1623/284/284.html")
self.assertEqual(response.status_code, HTTPStatus.OK)
content = response.content.decode()
ph = r"A 25m long (22m deep) resurgence in Altausee"
phmatch = re.search(ph, content)
with open('_cave_fix_cavehtml284.html', 'w') as f:
f.write(content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")
# Although the Cave object exists, it looks like we get a bad slug error when trying to get a QM page.
# def test_fix_qms(self):
# response = self.client.get("/cave/qms/1623-284")