Commit 5525e989 authored by Łukasz Nowak's avatar Łukasz Nowak

slapos/recipe/free_port: Cover the way to enforce port

parent e8faa79f
...@@ -60,6 +60,11 @@ class FreePortTest(unittest.TestCase): ...@@ -60,6 +60,11 @@ class FreePortTest(unittest.TestCase):
recipe = self.new_recipe(minimum=2000, maximum=2100) recipe = self.new_recipe(minimum=2000, maximum=2100)
self.assertEqual(recipe.options['port'], '0') self.assertEqual(recipe.options['port'], '0')
@useMock
def test_forcePort(self):
recipe = self.new_recipe(minimum=2134, maximum=2134)
self.assertEqual(recipe.options['port'], '2134')
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment