

import os
import unittest

import rapport.template


class TemplateTestCase(unittest.TestCase):
    def test__get_template_dirs(self):
        for type in ["plugin", "email", "web"]:
            template_dirs = rapport.template._get_template_dirs(type)
            self.assertIn(os.path.expanduser(os.path.join("~", ".rapport", "templates", type)), template_dirs)
            self.assertIn(os.path.join("templates", type), template_dirs)




import os
import unittest

import rapport.template


class TemplateTestCase(unittest.TestCase):
    def test__get_template_dirs(self):
        for type in ["plugin", "email", "web"]:
            template_dirs = rapport.template._get_template_dirs(type)
            self.assertIn(os.path.expanduser(os.path.join("~", ".rapport", "templates", type)), template_dirs)
            self.assertIn(os.path.join("rapport", "templates", type), template_dirs)


Adjust template path after change
Adjust template path after change

  
  
  import os
  import unittest
  
  import rapport.template
  
  
  class TemplateTestCase(unittest.TestCase):
      def test__get_template_dirs(self):
          for type in ["plugin", "email", "web"]:
              template_dirs = rapport.template._get_template_dirs(type)
              self.assertIn(os.path.expanduser(os.path.join("~", ".rapport", "templates", type)), template_dirs)
-             self.assertIn(os.path.join("templates", type), template_dirs)
+             self.assertIn(os.path.join("rapport", "templates", type), template_dirs)
  
  
Adjust template path after change
## Code Before:


import os
import unittest

import rapport.template


class TemplateTestCase(unittest.TestCase):
    def test__get_template_dirs(self):
        for type in ["plugin", "email", "web"]:
            template_dirs = rapport.template._get_template_dirs(type)
            self.assertIn(os.path.expanduser(os.path.join("~", ".rapport", "templates", type)), template_dirs)
            self.assertIn(os.path.join("templates", type), template_dirs)


## Instruction:
Adjust template path after change
## Code After:


import os
import unittest

import rapport.template


class TemplateTestCase(unittest.TestCase):
    def test__get_template_dirs(self):
        for type in ["plugin", "email", "web"]:
            template_dirs = rapport.template._get_template_dirs(type)
            self.assertIn(os.path.expanduser(os.path.join("~", ".rapport", "templates", type)), template_dirs)
            self.assertIn(os.path.join("rapport", "templates", type), template_dirs)

