예제 #1
0
파일: test_zfs.py 프로젝트: yutiansut/salt
 def test_to_str_space(self):
     '''
     Test to_str with 'my pool/my dataset'
     '''
     # NOTE: for fun we use both the '"str"' and "\"str\"" way of getting the literal string: "str"
     self.assertEqual(zfs.to_str('my pool/my dataset'), '"my pool/my dataset"')
     self.assertEqual(zfs.to_str(zfs.to_str('my pool/my dataset')), "\"my pool/my dataset\"")
예제 #2
0
 def test_to_str_squote_space(self):
     '''
     Test to_str with "my pool/jorge's dataset"
     '''
     self.assertEqual(zfs.to_str("my pool/jorge's dataset"),
                      "\"my pool/jorge's dataset\"")
     self.assertEqual(zfs.to_str(zfs.to_str("my pool/jorge's dataset")),
                      "\"my pool/jorge's dataset\"")
예제 #3
0
 def test_to_str_squote_space(self):
     """
     Test to_str with "my pool/jorge's dataset"
     """
     self.assertEqual(zfs.to_str("my pool/jorge's dataset"),
                      '"my pool/jorge\'s dataset"')
     self.assertEqual(
         zfs.to_str(zfs.to_str("my pool/jorge's dataset")),
         '"my pool/jorge\'s dataset"',
     )
예제 #4
0
 def test_to_str_passthrough(self):
     """
     Test to_str with 'passthrough'
     """
     self.assertEqual(zfs.to_str("passthrough"), "passthrough")
     self.assertEqual(zfs.to_str(zfs.to_str("passthrough")), "passthrough")
예제 #5
0
 def test_to_str_none(self):
     """
     Test to_str with 'none'
     """
     self.assertEqual(zfs.to_str(None), "none")
     self.assertEqual(zfs.to_str(zfs.to_str(None)), "none")
예제 #6
0
 def test_to_str_passthrough(self):
     '''
     Test to_str with 'passthrough'
     '''
     self.assertEqual(zfs.to_str('passthrough'), 'passthrough')
     self.assertEqual(zfs.to_str(zfs.to_str('passthrough')), 'passthrough')
예제 #7
0
 def test_to_str_none(self):
     '''
     Test to_str with 'none'
     '''
     self.assertEqual(zfs.to_str(None), 'none')
     self.assertEqual(zfs.to_str(zfs.to_str(None)), 'none')