summaryrefslogtreecommitdiff
path: root/yarnhelper_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'yarnhelper_tests.py')
-rw-r--r--yarnhelper_tests.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/yarnhelper_tests.py b/yarnhelper_tests.py
index 858bcdc..5e0f39a 100644
--- a/yarnhelper_tests.py
+++ b/yarnhelper_tests.py
@@ -22,62 +22,6 @@ import unittest
import yarnhelper
-class GetNextMatchTests(unittest.TestCase):
-
- def test_raises_error_if_no_next_match(self):
- h = yarnhelper.YarnHelper()
- h.set_environment({})
- with self.assertRaises(yarnhelper.Error):
- h.get_next_match()
-
- def test_returns_first_match_if_there(self):
- h = yarnhelper.YarnHelper()
- h.set_environment({
- 'MATCH_1': 'first',
- })
- self.assertEqual(h.get_next_match(), 'first')
-
- def test_returns_second_match_if_there(self):
- h = yarnhelper.YarnHelper()
- h.set_environment({
- 'MATCH_1': 'first',
- 'MATCH_2': 'second',
- })
- self.assertEqual(h.get_next_match(), 'first')
- self.assertEqual(h.get_next_match(), 'second')
-
- def test_raises_error_if_no_more_matches(self):
- h = yarnhelper.YarnHelper()
- h.set_environment({
- 'MATCH_1': 'first',
- })
- self.assertEqual(h.get_next_match(), 'first')
- with self.assertRaises(yarnhelper.Error):
- h.get_next_match()
-
-
-class PersistentVariableTests(unittest.TestCase):
-
- def setUp(self):
- # We need this so that tearDown works
- pass
-
- def tearDown(self):
- if os.path.exists(yarnhelper.variables_filename):
- os.remove(yarnhelper.variables_filename)
-
- def test_returns_default_if_no_such_variable(self):
- h = yarnhelper.YarnHelper()
- self.assertEqual(h.get_variable('foo', default=42), 42)
-
- def test_sets_variable_persistently(self):
- h = yarnhelper.YarnHelper()
- h.set_variable('FOO', 'bar')
-
- h2 = yarnhelper.YarnHelper()
- self.assertEqual(h2.get_variable('FOO'), 'bar')
-
-
class HttpTests(unittest.TestCase):
def test_constructs_aliased_request(self):