def test_size_nonint(self): with self.assertRaises(ValueError): get_size(["--size", "abc"])
def test_get_size(self): self.assertEqual(get_size(["--size", "1912", "blueprint", "type"]), (["blueprint", "type"], 2004877312))
def test_size_no_value(self): with self.assertRaises(RuntimeError): get_size(["--size"])
def test_size_later(self): self.assertEqual(get_size(["start", "--size", "100", "type"]), (["start", "type"], 104857600))
def test_no_size(self): self.assertEqual( get_size(["blueprint", "type", "imagename", "profile"]), (["blueprint", "type", "imagename", "profile"], 0))
def test_empty(self): self.assertEqual(get_size([]), ([], 0))
def test_size_later(self): with self.assertRaises(RuntimeError): get_size(["blueprint", "--size", "100", "type"])