|
| 1 | +# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
| 2 | +# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com> |
| 3 | +# |
| 4 | +# Redistribution and use in source and binary forms, with or without |
| 5 | +# modification, are permitted provided that the following conditions |
| 6 | +# are met: |
| 7 | +# |
| 8 | +# * Redistributions of source code must retain the above copyright |
| 9 | +# notice, this list of conditions and the following disclaimer. |
| 10 | +# |
| 11 | +# * Redistributions in binary form must reproduce the above |
| 12 | +# copyright notice, this list of conditions and the following |
| 13 | +# disclaimer in the documentation and/or other materials provided |
| 14 | +# with the distribution. |
| 15 | +# |
| 16 | +# * Neither the name of the Nokia Corporation and/or its |
| 17 | +# subsidiary(-ies) nor the names of its contributors may be used |
| 18 | +# to endorse or promote products derived from this software |
| 19 | +# without specific prior written permission. |
| 20 | +# |
| 21 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 22 | +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 23 | +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 24 | +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 25 | +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 26 | +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 27 | +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 28 | +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 29 | +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 30 | +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 31 | +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
1 | 32 |
|
| 33 | +import os |
| 34 | +import unittest |
| 35 | +from django.conf import settings |
2 | 36 | from ietf.utils.test_utils import SimpleUrlTestCase |
3 | 37 |
|
4 | 38 | class WgInfoUrlTestCase(SimpleUrlTestCase): |
5 | 39 | def testUrls(self): |
6 | 40 | self.doTestUrls(__file__) |
| 41 | + |
| 42 | +class WgFileTestCase(unittest.TestCase): |
| 43 | + def testFileExistence(self): |
| 44 | + print "Testing if WG charter files exist locally" |
| 45 | + fpath = os.path.join(settings.IETFWG_DESCRIPTIONS_PATH, "tls.desc.txt") |
| 46 | + if not os.path.exists(fpath): |
| 47 | + print "\nERROR: charter files not found in "+settings.IETFWG_DESCRIPTIONS_PATH |
| 48 | + print "They are needed for testing WG charter pages." |
| 49 | + print "(you can't currently download them, but we're working on this.)" |
| 50 | + print "And set IETFWG_DESCRIPTIONS_PATH in settings_local.py\n" |
| 51 | + else: |
| 52 | + print "OK (they seem to exist)" |
| 53 | + |
0 commit comments