"""
 Copyright (c) 2011, Open Technologies Bulgaria, Ltd. <http://otb.bg>
 Author: Alexander Todorov <atodorov@nospam.otb.bg>

 Tests for the cartridges list functionality.
"""

import os
import sys
import unittest

dirname = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(dirname, ".."))


from openshift import OpenShiftExpress

class TestCartList(unittest.TestCase):
    '''
        Test the OpenShiftExpress.get_cartridges_list() method
    '''

    def test_get_cart_list(self):
        '''If the list is not empty then PASS'''
        oshift = OpenShiftExpress(rhlogin=None, password=None)
        carts = oshift.get_cartridges_list()
        self.assertTrue(len(carts) > 0)


if __name__ == '__main__':
    unittest.main()

@@ -348,16 +348,36 @@
 tExpress
+, OpenShiftException
 %0A%0Aclass 
@@ -720,16 +720,627 @@
 s) %3E 0)%0A
+        print carts%0A%0A    def test_get_cart_list_embedded(self):%0A        '''If the list is not empty then PASS'''%0A        oshift = OpenShiftExpress(rhlogin=None, password=None)%0A        carts = oshift.get_cartridges_list('embedded')%0A        self.assertTrue(len(carts) %3E 0)%0A        print carts%0A%0A    def test_get_cart_list_unknown(self):%0A        '''If the list is not empty then PASS'''%0A        oshift = OpenShiftExpress(rhlogin=None, password=None)%0A        try:%0A            carts = oshift.get_cartridges_list('unknown')%0A        except OpenShiftException as e:%0A            self.assertTrue(True)%0A            print e%0A
 %0A%0Aif __n

print function results for visual inspection and add more tests