Skip to content

Commit b740db3

Browse files
committed
Make it possible to specify a testurl file to doTestUrls
- Legacy-Id: 2870
1 parent 11865dc commit b740db3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ietf/utils/test_utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from django.db import connection
3939
from django.test import TestCase
4040
from django.test.client import Client
41-
import ietf
41+
import ietf.settings
4242
from django.conf import settings
4343
from datetime import datetime
4444
import urllib2 as urllib
@@ -117,7 +117,10 @@ def tearDown(self):
117117
self.tearDownRealDatabase()
118118

119119
def doTestUrls(self, test_filename):
120-
filename = os.path.dirname(os.path.abspath(test_filename))+"/testurl.list"
120+
if test_filename.endswith(".list"):
121+
filename = test_filename
122+
else:
123+
filename = os.path.dirname(os.path.abspath(test_filename))+"/testurl.list"
121124
print " Reading "+filename
122125
tuples = read_testurls(filename)
123126
failures = 0

0 commit comments

Comments
 (0)