Ignore:
Timestamp:
1 Jan 2015, 21:56:40 (10 years ago)
Author:
Henrik Bettermann
Message:

Store 'terms and conditions' of products.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_browser.py

    r12358 r12361  
    193193        self.assertEqual(self.browser.url, self.manage_product_path)
    194194        self.browser.getControl(name="form.title").value = 'New license'
     195        self.browser.getControl(name="form.terms_and_conditions").value = """
     196<h1>Hello World</h1>
     197>>de<<
     198<h1>Hallo Welt</h1>
     199"""
    195200        self.browser.getControl("Save").click()
    196201        self.assertEqual(self.app['products']['LIC'].title, 'New license')
     202        # tc_dict has been saved
     203        self.assertEqual(self.app['products']['LIC'].tc_dict,
     204            {'de': u'<div id="html">\n<h1>Hallo Welt</h1>\n</div id="html">',
     205             'en': u'<div id="html">\n<h1>Hello World</h1>\n</div id="html">'})
    197206        # Managers can asign local roles
    198207        self.browser.getControl(name="user").value = ['john']
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_export.py

    r12358 r12361  
    6363        self.assertTrue(
    6464            'contract_category,contract_title,options,'
    65             'product_id,title,valid_from,valid_to,users_with_local_roles\r\n'
    66             'license,,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",LIC,Unnamed'
     65            'product_id,terms_and_conditions,title,valid_from,valid_to,users_with_local_roles\r\n'
     66            'license,,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",LIC,,Unnamed'
    6767            ',2015-12-04#,,"[{\'user_name\': u\'john\', \'local_role\': '
    6868            'u\'johnsrole\'}]"\r\n'
     
    7878        self.assertTrue(
    7979            'contract_category,contract_title,options,'
    80             'product_id,title,valid_from,valid_to,users_with_local_roles\r\n'
    81             'license,,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",LIC,Unnamed'
     80            'product_id,terms_and_conditions,title,valid_from,valid_to,users_with_local_roles\r\n'
     81            'license,,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",LIC,,Unnamed'
    8282            ',2015-12-04#,,"[{\'user_name\': u\'john\', \'local_role\': '
    8383            'u\'johnsrole\'}]"\r\n'
Note: See TracChangeset for help on using the changeset viewer.