Ejemplo n.º 1
0
 def test_load_from_bad_dir(self):
     with self.assertRaises(Exception):
         restretto.load("test-data/broken")
Ejemplo n.º 2
0
 def test_load_from_dir(self):
     data = restretto.load("test-data/")
     self.assertEqual(len(data), 3)
Ejemplo n.º 3
0
 def test_load_from_unexistant_dir(self):
     with self.assertRaises(FileNotFoundError):
         restretto.load("test-data/missing-dir")
Ejemplo n.º 4
0
 def test_missing_actions(self):
     data = restretto.load('test-data/missing-actions.yml')
     self.assertFalse(data)
Ejemplo n.º 5
0
 def test_actions_requests_error(self):
     with self.assertRaises(restretto.errors.ParseError):
         restretto.load('test-data/broken/actions-with-requests.yml')
Ejemplo n.º 6
0
 def test_empty_actions(self):
     data = restretto.load('test-data/empty-actions.yml')
     self.assertFalse(data)
Ejemplo n.º 7
0
 def test_load_valid_file(self):
     data = restretto.load("test-data/simple.yml")
     self.assertEqual(len(data), 1)
Ejemplo n.º 8
0
 def test_load_bad_file(self):
     with self.assertRaises(Exception):
         restretto.load("test-data/broken/bad.yml")
Ejemplo n.º 9
0
 def test_load_empty_file(self):
     data = restretto.load("test-data/empty.yml")
     self.assertFalse(data)
Ejemplo n.º 10
0
 def test_load_unexisting_file(self):
     with self.assertRaises(FileNotFoundError):
         restretto.load("test-data/unesixtant_file.yml")