From 937a252e16695291da5595712d8852fea3906460 Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Tue, 30 Jun 2015 15:57:41 -0600 Subject: [PATCH] remove unnecessary file state tests --- tests/unit/states/file_test.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/unit/states/file_test.py b/tests/unit/states/file_test.py index 0c124cad8b..3a524f4c48 100644 --- a/tests/unit/states/file_test.py +++ b/tests/unit/states/file_test.py @@ -733,7 +733,7 @@ class FileTestCase(TestCase): self.assertDictEqual(filestate.recurse(name, source), ret) with patch.object(os.path, 'isabs', mock_t): - comt = ("'source' parameter is not a string or list of strings") + comt = ("Invalid source '1' (must be a salt:// URI)") ret.update({'comment': comt}) self.assertDictEqual(filestate.recurse(name, 1), ret) @@ -994,10 +994,7 @@ class FileTestCase(TestCase): ret) ret.pop('data', None) - comt = ('Given text is not a string or a list of strings') - ret.update({'comment': comt, 'name': name}) - self.assertDictEqual(filestate.append(name), ret) - + ret.update({'name': name}) with patch.object(salt.utils, 'fopen', MagicMock(mock_open(read_data=''))): comt = ('No text found to append. Nothing appended') @@ -1077,10 +1074,7 @@ class FileTestCase(TestCase): ret) ret.pop('data', None) - comt = ('Given text is not a string or a list of strings') - ret.update({'comment': comt, 'name': name}) - self.assertDictEqual(filestate.prepend(name), ret) - + ret.update({'name': name}) with patch.object(salt.utils, 'fopen', MagicMock(mock_open(read_data=''))): with patch.object(salt.utils, 'istextfile', mock_f):