Exemple #1
0
 def test_raw_params(self):
     wo = WorkOrder()
     wo.add_param(
         'foo',
         '<DEL-ONT::DID=7340032\\054FN=0\\054SN=1\\054PN=0\\054ONTID=9\\054DELCONFIG=TRUE:1::;>'
     )
     self.assertEquals([
         'DEL-ONT::DID=7340032\\054FN=0\\054SN=1\\054PN=0\\054ONTID=9\\054DELCONFIG=TRUE:1::;'
     ], wo.raw_params['foo'])
Exemple #2
0
 def test_params_unescaped(self):
     wo = WorkOrder()
     wo.add_param(
         'foo',
         '<DEL-ONT::DID=7340032\\054FN=0\\054SN=1\\054PN=0\\054ONTID=9\\054DELCONFIG=TRUE:1::;>'
     )
     self.assertEquals([
         'DEL-ONT::DID=7340032,FN=0,SN=1,PN=0,ONTID=9,DELCONFIG=TRUE:1::;'
     ], wo.params['foo'])
Exemple #3
0
 def test_complex(self):
     wo = WorkOrder()
     wo.add_param('foo', '<LST-ONTDETAIL::ALIAS=9999999999999999:0::;>')
     self.assertEquals(['LST-ONTDETAIL::ALIAS=9999999999999999:0::;'],
                       wo.params['foo'])
Exemple #4
0
 def test_multiple(self):
     wo = WorkOrder()
     wo.add_param('foo', '<bar> <quux>')
     self.assertEquals(['bar', 'quux'], wo.params['foo'])
Exemple #5
0
 def test_nested(self):
     wo = WorkOrder()
     wo.add_param('foo', '<bar> <quux> <<quirg>>')
     self.assertEquals(['bar', 'quux', '<quirg>'], wo.params['foo'])
Exemple #6
0
 def test_null(self):
     wo = WorkOrder()
     wo.add_param('foo', '')
     self.assertEquals(0, len(wo.params['foo']))
Exemple #7
0
 def test_simple(self):
     wo = WorkOrder()
     wo.add_param('foo', '<bar>')
     self.assertEquals(['bar'], wo.params['foo'])
 def test_params_unescaped(self):
     wo = WorkOrder()
     wo.add_param('foo', '<DEL-ONT::DID=7340032\\054FN=0\\054SN=1\\054PN=0\\054ONTID=9\\054DELCONFIG=TRUE:1::;>')
     self.assertEquals(['DEL-ONT::DID=7340032,FN=0,SN=1,PN=0,ONTID=9,DELCONFIG=TRUE:1::;'], wo.params['foo'])
 def test_raw_params(self):
     wo = WorkOrder()
     wo.add_param('foo', '<DEL-ONT::DID=7340032\\054FN=0\\054SN=1\\054PN=0\\054ONTID=9\\054DELCONFIG=TRUE:1::;>')
     self.assertEquals(['DEL-ONT::DID=7340032\\054FN=0\\054SN=1\\054PN=0\\054ONTID=9\\054DELCONFIG=TRUE:1::;'],
                       wo.raw_params['foo'])
 def test_complex(self):
     wo = WorkOrder()
     wo.add_param('foo', '<LST-ONTDETAIL::ALIAS=9999999999999999:0::;>')
     self.assertEquals(['LST-ONTDETAIL::ALIAS=9999999999999999:0::;'], wo.params['foo'])
 def test_nested(self):
     wo = WorkOrder()
     wo.add_param('foo', '<bar> <quux> <<quirg>>')
     self.assertEquals(['bar', 'quux', '<quirg>'], wo.params['foo'])
 def test_multiple(self):
     wo = WorkOrder()
     wo.add_param('foo', '<bar> <quux>')
     self.assertEquals(['bar', 'quux'], wo.params['foo'])
 def test_simple(self):
     wo = WorkOrder()
     wo.add_param('foo', '<bar>')
     self.assertEquals(['bar'], wo.params['foo'])
 def test_null(self):
     wo = WorkOrder()
     wo.add_param('foo', '')
     self.assertEquals(0, len(wo.params['foo']))