
import glob
import json
import os
import unittest

# Local imports
import config


class ConfigExpanderTest(unittest.TestCase):

  def testAllFiles(self):
    in_yaml = glob.glob(os.path.join('testdata', '*.in.yaml'))
    for input_file in in_yaml:
      expected = input_file.replace('in.yaml', 'out.json')
      with open(expected) as expected_in:
        expected_json = json.loads(expected_in.read(), encoding='utf-8')

      expander = config.ConfigExpander(project='dummy-project', zone='dummy-zone')
      actual_json = expander.ExpandFile(input_file)

      self.assertEqual(expected_json, actual_json)


if __name__ == '__main__':
  unittest.main()


import glob
import json
import os
import unittest

# Local imports
import config_yaml


class ConfigExpanderTest(unittest.TestCase):

  def testAllFiles(self):
    in_yaml = glob.glob(os.path.join('testdata', '*.in.yaml'))
    for input_file in in_yaml:
      expected = input_file.replace('in.yaml', 'out.json')
      with open(expected) as expected_in:
        expected_json = json.loads(expected_in.read(), encoding='utf-8')

      expander = config_yaml.ConfigExpander(project='dummy-project', zone='dummy-zone')
      actual_json = expander.ExpandFile(input_file)

      self.assertEqual(expected_json, actual_json)


if __name__ == '__main__':
  unittest.main()

Fix module path (config -> config_yaml) to unbreak test.
Fix module path (config -> config_yaml) to unbreak test.

  
  import glob
  import json
  import os
  import unittest
  
  # Local imports
- import config
+ import config_yaml
  
  
  class ConfigExpanderTest(unittest.TestCase):
  
    def testAllFiles(self):
      in_yaml = glob.glob(os.path.join('testdata', '*.in.yaml'))
      for input_file in in_yaml:
        expected = input_file.replace('in.yaml', 'out.json')
        with open(expected) as expected_in:
          expected_json = json.loads(expected_in.read(), encoding='utf-8')
  
-       expander = config.ConfigExpander(project='dummy-project', zone='dummy-zone')
+       expander = config_yaml.ConfigExpander(project='dummy-project', zone='dummy-zone')
        actual_json = expander.ExpandFile(input_file)
  
        self.assertEqual(expected_json, actual_json)
  
  
  if __name__ == '__main__':
    unittest.main()
  
Fix module path (config -> config_yaml) to unbreak test.
## Code Before:

import glob
import json
import os
import unittest

# Local imports
import config


class ConfigExpanderTest(unittest.TestCase):

  def testAllFiles(self):
    in_yaml = glob.glob(os.path.join('testdata', '*.in.yaml'))
    for input_file in in_yaml:
      expected = input_file.replace('in.yaml', 'out.json')
      with open(expected) as expected_in:
        expected_json = json.loads(expected_in.read(), encoding='utf-8')

      expander = config.ConfigExpander(project='dummy-project', zone='dummy-zone')
      actual_json = expander.ExpandFile(input_file)

      self.assertEqual(expected_json, actual_json)


if __name__ == '__main__':
  unittest.main()

## Instruction:
Fix module path (config -> config_yaml) to unbreak test.
## Code After:

import glob
import json
import os
import unittest

# Local imports
import config_yaml


class ConfigExpanderTest(unittest.TestCase):

  def testAllFiles(self):
    in_yaml = glob.glob(os.path.join('testdata', '*.in.yaml'))
    for input_file in in_yaml:
      expected = input_file.replace('in.yaml', 'out.json')
      with open(expected) as expected_in:
        expected_json = json.loads(expected_in.read(), encoding='utf-8')

      expander = config_yaml.ConfigExpander(project='dummy-project', zone='dummy-zone')
      actual_json = expander.ExpandFile(input_file)

      self.assertEqual(expected_json, actual_json)


if __name__ == '__main__':
  unittest.main()
