예제 #1
0
 def test_auto_locate(self):
     """
     Test that based on settings.BASE_DIR, the package.json folder
     can be found.
     """
     root = os.path.abspath(settings.PROJECT_DIR)
     path = settings.SYSTEMJS_PACKAGE_JSON_DIR
     self.assertEqual(path, root)
     package_json = locate_package_json()
     self.assertEqual(package_json, os.path.join(root, 'package.json'))
 def test_auto_locate(self):
     """
     Test that based on settings.BASE_DIR, the package.json folder
     can be found.
     """
     root = os.path.abspath(settings.PROJECT_DIR)
     path = settings.SYSTEMJS_PACKAGE_JSON_DIR
     self.assertEqual(path, root)
     package_json = locate_package_json()
     self.assertEqual(package_json, os.path.join(root, 'package.json'))
예제 #3
0
 def test_invalid_dir(self):
     with self.assertRaises(ImproperlyConfigured):
         locate_package_json()
예제 #4
0
 def test_load_overridden_path(self):
     package_json = locate_package_json()
     self.assertEqual(package_json,
                      os.path.join(overridden_path, 'package.json'))
예제 #5
0
 def test_invalid_systemjs_package_json_dir_setting(self):
     with self.assertRaises(ImproperlyConfigured):
         locate_package_json()
 def test_invalid_dir(self):
     with self.assertRaises(ImproperlyConfigured):
         locate_package_json()
 def test_load_overridden_path(self):
     package_json = locate_package_json()
     self.assertEqual(package_json, os.path.join(overridden_path, 'package.json'))
 def test_invalid_systemjs_package_json_dir_setting(self):
     with self.assertRaises(ImproperlyConfigured):
         locate_package_json()