Get started with some tests on the python code

This commit is contained in:
Hugo Trippaers 2014-11-14 12:28:02 +01:00 committed by wilderrodrigues
parent b07ff145b3
commit 628af2f973
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import unittest
from cs.CsAddress import CsAddress
import merge
class TestCsAddress(unittest.TestCase):
def setUp(self):
merge.dataBag.DPATH = "."
def test_needs_vrrp(self):
csaddress = CsAddress("ips", {})
self.assertTrue(csaddress.needs_vrrp({"nw_type": "public"}))
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,8 @@
#!/bin/bash
# requires netaddr
export PYTHONPATH="../../patches/debian/config/opt/cloud/bin/"
export PYTHONDONTWRITEBYTECODE=False
nosetests .