chitamoor / Rester

Testing RESTful APIs
MIT License
85 stars 34 forks source link

There is a bug #12

Closed baiyunping333 closed 9 years ago

baiyunping333 commented 9 years ago

in testcase.py:27,

for test in test_suite.test_cases:
    self.run_test_case(test)

test is a TestCase instance, not a file path string. maybe right is:

for test in test_suite.test_cases:
    if isinstance(test, str):
        self.run_test_case(test)
    elif isinstance(test, TestCase):
        test.load()
        self._run_case(test)
    else:
        self.logger.info("not valid test case")
rizwan582 commented 9 years ago

yes I've faced this bug as well. The way I've fixed is by updating line 30 of testcase.py file as follows:

original line:

case = TestCase(None, test_case_file_name)        

fixed line:

case = TestCase(None, test_case_file_name.filename) # test_case_file_name.filename instead of test_case_file_name

May have other better fix, but at least this is working for me for the time being.

chitamoor commented 9 years ago

Thanks for the suggestions and workarounds. Checked in a commit to fix the issue reported.