Exemple #1
0
 def test_multiple_csv_expands_in_dict(self):
     result = api.parse_tags(
         'ceph.osd_something=1,ceph.foo=2,ceph.fsid=0000')
     # assert them piecemeal to avoid the un-ordered dict nature
     assert result['ceph.osd_something'] == '1'
     assert result['ceph.foo'] == '2'
     assert result['ceph.fsid'] == '0000'
Exemple #2
0
 def test_no_tags_means_empty_dict(self):
     result = api.parse_tags('')
     assert result == {}
Exemple #3
0
 def test_multiple_csv_expands_in_dict(self):
     result = api.parse_tags('ceph.osd_something=1,ceph.foo=2,ceph.fsid=0000')
     # assert them piecemeal to avoid the un-ordered dict nature
     assert result['ceph.osd_something'] == '1'
     assert result['ceph.foo'] == '2'
     assert result['ceph.fsid'] == '0000'
Exemple #4
0
 def test_single_tag_gets_parsed(self):
     result = api.parse_tags('ceph.osd_something=1')
     assert result == {'ceph.osd_something': '1'}