diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2014-11-13 17:14:38 -0800 |
---|---|---|
committer | Toshio Kuratomi <toshio@fedoraproject.org> | 2014-11-14 07:45:56 -0800 |
commit | 0c312e417a2d8e4eb90482df3618bbb935507a6c (patch) | |
tree | 42e6637c8dccfedc95e0f9e33ec8b70ccf9b655c | |
parent | e1ecc5ca8e8b991da2b5f683ca23e6997c993b62 (diff) | |
download | ansible-modules-core-0c312e417a2d8e4eb90482df3618bbb935507a6c.tar.gz |
Moving unittests to the main ansible repo for now
-rw-r--r-- | tests/__init__.py | 0 | ||||
-rw-r--r-- | tests/test_apt.py | 40 |
2 files changed, 0 insertions, 40 deletions
diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 --- a/tests/__init__.py +++ /dev/null diff --git a/tests/test_apt.py b/tests/test_apt.py deleted file mode 100644 index a7eb3d3f..00000000 --- a/tests/test_apt.py +++ /dev/null @@ -1,40 +0,0 @@ -import collections -import mock -import os -import unittest - -from packaging.apt import ( - expand_pkgspec_from_fnmatches, -) - - -class AptExpandPkgspecTestCase(unittest.TestCase): - - def setUp(self): - FakePackage = collections.namedtuple("Package", ("name",)) - self.fake_cache = [ FakePackage("apt"), - FakePackage("apt-utils"), - ] - - def test_trivial(self): - foo = ["apt"] - self.assertEqual( - expand_pkgspec_from_fnmatches(None, foo, self.fake_cache), foo) - - def test_bug_28(self): - foo = ["apt=1.0*"] - self.assertEqual( - expand_pkgspec_from_fnmatches(None, foo, self.fake_cache), foo) - - def test_pkgname_wildcard_version_wildcard_fails(self): - foo = ["apt*=1.0*"] - m_mock = mock.Mock() - expand_pkgspec_from_fnmatches(m_mock, foo, self.fake_cache) - self.assertTrue(m_mock.fail_json.called) - - def test_pkgname_expands(self): - foo = ["apt*"] - m_mock = mock.Mock() - self.assertEqual( - expand_pkgspec_from_fnmatches(m_mock, foo, self.fake_cache), - ["apt", "apt-utils"]) |