Fix file pathing error caused by differences between 2 and 3.
@@ -3,6 +3,8 @@ import mock
from django.test import TestCase
from django_dynamic_fixture import get
+import six
+
from readthedocs_build.config import BuildConfig, ProjectConfig, InvalidConfig
from readthedocs.builds.models import Version
from readthedocs.projects.models import Project
@@ -187,11 +189,12 @@ class LoadConfigTests(TestCase):
self.assertEqual(config.conda_file, None)
def test_requirements_file(self, load_config):
+ requirements_file = 'wsgi.py' if six.PY2 else 'readthedocs/wsgi.py'
load_config.side_effect = create_load({
- 'requirements_file': 'wsgi.py'
+ 'requirements_file': requirements_file
})
config = load_yaml_config(self.version)
- self.assertEqual(config.requirements_file, 'wsgi.py')
+ self.assertEqual(config.requirements_file, requirements_file)
load_config.side_effect = create_load()
config = load_yaml_config(self.version)
