mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Get started with some tests on the python code
This commit is contained in:
parent
b07ff145b3
commit
628af2f973
16
systemvm/test/python/TestCsAddress.py
Normal file
16
systemvm/test/python/TestCsAddress.py
Normal 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()
|
||||
8
systemvm/test/python/runtests.sh
Normal file
8
systemvm/test/python/runtests.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# requires netaddr
|
||||
|
||||
export PYTHONPATH="../../patches/debian/config/opt/cloud/bin/"
|
||||
export PYTHONDONTWRITEBYTECODE=False
|
||||
|
||||
nosetests .
|
||||
Loading…
x
Reference in New Issue
Block a user