Merge branch 'master' of ssh://git.labs.libre-entreprise.org/gitroot/tiramisu
authorgwen <gremond@cadoles.com>
Tue, 25 Feb 2014 15:19:49 +0000 (16:19 +0100)
committergwen <gremond@cadoles.com>
Tue, 25 Feb 2014 15:19:49 +0000 (16:19 +0100)
1  2 
test/test_config_domain.py
tiramisu/option.py

@@@ -24,20 -24,13 +24,26 @@@ def test_domainname()
      #
      c.f = 'toto.com'
      c.f = 'toto'
+     raises(ValueError, "c.f = 'domainnametoolongthathavemorethanmaximumsizeforatruedomainnameanditsnoteasytogeneratesolongdomainnamewithoutrepeatdomainnametoolongthathavemorethanmaximumsizeforatruedomainnameanditsnoteasytogeneratesolongdomainnamewithoutrepeatbutimnotabletodoitnowiendityeah'")
+     raises(ValueError, "c.f = 'd'")
+     #
+     c.g = 'toto.com'
+     c.g = '192.168.1.0'
+     c.g = '192.168.1.29'
  
 +def test_special_domain_name():
 +    """domain name option that starts with a number or not
 +    """
 +    d = DomainnameOption('d', '')
 +    e = DomainnameOption('e', '', type_='netbios')
 +    od = OptionDescription('a', '', [d,e])
 +    c = Config(od)
 +    c.read_write()
 +    c.d = '1toto.com'
 +    c.d = '123toto.com'
 +    c.e = 'toto'
 +    raises(ValueError, "c.e = '1toto'")
 +
  
  def test_domainname_netbios():
      d = DomainnameOption('d', '', type_='netbios')
Simple merge