Beispiel #1
0
 def test_size_nonint(self):
     with self.assertRaises(ValueError):
         get_size(["--size", "abc"])
Beispiel #2
0
 def test_get_size(self):
     self.assertEqual(get_size(["--size", "1912", "blueprint", "type"]),
                      (["blueprint", "type"], 2004877312))
Beispiel #3
0
 def test_size_no_value(self):
     with self.assertRaises(RuntimeError):
         get_size(["--size"])
Beispiel #4
0
 def test_size_later(self):
     self.assertEqual(get_size(["start", "--size", "100", "type"]),
                      (["start", "type"], 104857600))
Beispiel #5
0
 def test_no_size(self):
     self.assertEqual(
         get_size(["blueprint", "type", "imagename", "profile"]),
         (["blueprint", "type", "imagename", "profile"], 0))
Beispiel #6
0
 def test_empty(self):
     self.assertEqual(get_size([]), ([], 0))
Beispiel #7
0
 def test_size_later(self):
     with self.assertRaises(RuntimeError):
         get_size(["blueprint", "--size", "100", "type"])