def test_pop_key_exists(self):
     d = DockerOpts()
     d.add('temporary', 'test-flag-pop')
     # assert the data made it before we attempt popping it off the dict
     assert 'test-flag-pop' in d.data['temporary']
     d.pop('temporary')
     assert 'temporary' not in d.data
Esempio n. 2
0
 def test_pop_key_exists(self):
     d = DockerOpts()
     d.add('temporary', 'test-flag-pop')
     # assert the data made it before we attempt popping it off the dict
     assert 'test-flag-pop' in d.data['temporary']
     d.pop('temporary')
     assert 'temporary' not in d.data
 def test_pop_non_existant_key(self):
     d = DockerOpts()
     with pytest.raises(KeyError):
         d.pop('nonexistant')
Esempio n. 4
0
 def test_pop_non_existant_key(self):
     d = DockerOpts()
     with pytest.raises(KeyError):
         d.pop('nonexistant')