import unittest
from cronquot.cronquot import has_directory


class CronquotTest(unittest.TestCase):

    def test_has_directory(self):
        self.assertTrue(has_directory('/tmp'))

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

import unittest
import os
from cronquot.cronquot import has_directory


class CronquotTest(unittest.TestCase):

    def test_has_directory(self):
        sample_dir = os.path.join(
                os.path.dirname(__file__), 'crontab')
        self.assertTrue(has_directory(sample_dir))

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

Fix to test crontab dir
Fix to test crontab dir

  import unittest
+ import os
  from cronquot.cronquot import has_directory
  
  
  class CronquotTest(unittest.TestCase):
  
      def test_has_directory(self):
+         sample_dir = os.path.join(
+                 os.path.dirname(__file__), 'crontab')
-         self.assertTrue(has_directory('/tmp'))
+         self.assertTrue(has_directory(sample_dir))
  
  if __name__ == '__main__':
      unittest.test()
  
Fix to test crontab dir
## Code Before:
import unittest
from cronquot.cronquot import has_directory


class CronquotTest(unittest.TestCase):

    def test_has_directory(self):
        self.assertTrue(has_directory('/tmp'))

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

## Instruction:
Fix to test crontab dir
## Code After:
import unittest
import os
from cronquot.cronquot import has_directory


class CronquotTest(unittest.TestCase):

    def test_has_directory(self):
        sample_dir = os.path.join(
                os.path.dirname(__file__), 'crontab')
        self.assertTrue(has_directory(sample_dir))

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