test that emulator fails if requirement has illegal object_id
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								030d5919e6
							
						
					
				
			
			
				commit
				
					
						2a5465c03c
					
				
			
		
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -73,3 +73,10 @@ class EmulatorTestCase(unittest.TestCase):
 | 
				
			||||||
        os.environ['require'] = '__does-not-exist/some-id'
 | 
					        os.environ['require'] = '__does-not-exist/some-id'
 | 
				
			||||||
        emu = emulator.Emulator(argv)
 | 
					        emu = emulator.Emulator(argv)
 | 
				
			||||||
        self.assertRaises(core.NoSuchTypeError, emu.run)
 | 
					        self.assertRaises(core.NoSuchTypeError, emu.run)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def test_illegal_object_id_requirement(self):
 | 
				
			||||||
 | 
					        argv = ['__file', '/tmp/foobar']
 | 
				
			||||||
 | 
					        os.environ.update(self.env)
 | 
				
			||||||
 | 
					        os.environ['require'] = '__file/bad/id/with/.cdist/inside'
 | 
				
			||||||
 | 
					        emu = emulator.Emulator(argv)
 | 
				
			||||||
 | 
					        self.assertRaises(core.IllegalObjectIdError, emu.run)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue