Skip to content

Commit

Permalink
Adding a couple tests for version_clean and check_extra_requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgreenaway committed Dec 3, 2019
1 parent bc34f70 commit 5e697d2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/unit/modules/test_opkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,15 @@ def test_info_installed(self):
mock = MagicMock(return_value=ret_value)
with patch.dict(opkg.__salt__, {'cmd.run_all': mock}):
self.assertEqual(opkg.info_installed('vim'), expected_dict)

def test_version_clean(self):
'''
Test - Return the information of version_clean
'''
self.assertEqual(opkg.version_clean('1.0.1'), '1.0.1')

def test_check_extra_requirements(self):
'''
Test - Return the information of check_extra_requirements
'''
self.assertEqual(opkg.check_extra_requirements('vim', '1.0.1'), True)

0 comments on commit 5e697d2

Please sign in to comment.