Exemplo n.º 1
0
    def test_fixture_loader(self):
        expected = {'version': 1.0, 'basic': {'tasks': [{'task1': 'foobar'}]}}

        content = loader.get_fixture_content('mock/basic.yaml', 'workflows')

        self.assertIsInstance(content, dict)
        self.assertDictEqual(content, expected)
Exemplo n.º 2
0
    def test_fixture_loader(self):
        expected = {"version": 1.0, "basic": {"tasks": [{"task1": "foobar"}]}}

        content = fixture_loader.get_fixture_content("mock/basic.yaml", "workflows")

        self.assertIsInstance(content, dict)
        self.assertDictEqual(content, expected)
Exemplo n.º 3
0
    def test_fixture_loader_raw(self):
        expected = "version: 1.0\nbasic:\n  tasks:\n    - task1: foobar\n"
        content = loader.get_fixture_content('mock/basic.yaml',
                                             'workflows',
                                             raw=True)

        self.assertIsInstance(content, str)
        self.assertEqual(content, expected)
Exemplo n.º 4
0
 def get_wf_def(self, wf_name, raw=False):
     return fixture_loader.get_fixture_content(
         self.get_fixture_path(wf_name), 'workflows', raw=raw)