Esempio n. 1
0
 def setUp(self):
     super(BrandingInfoConfigTest, self).setUp()
     self.configuration_string = """{
         "CN": {
                 "url": "http://www.xuetangx.com",
                 "logo_src": "http://www.xuetangx.com/static/images/logo.png",
                 "logo_tag": "Video hosted by XuetangX.com"
         }
     }"""
     self.config = BrandingInfoConfig(configuration=self.configuration_string)
Esempio n. 2
0
 def test_clean_bad_json(self):
     """
     Tests if bad Json string was given.
     """
     self.config = BrandingInfoConfig(configuration='{"bad":"test"')
     self.assertRaises(ValidationError, self.config.clean)