camptocamp / c2cgeoportal

c2cgeoportal application
http://geomapfish.org
Other
64 stars 46 forks source link

test_entry.py functional tests are broken #27

Closed elemoine closed 12 years ago

elemoine commented 12 years ago

The introduction of WFSTypes and externalWFSTypes variables break the tests, see 11528e17. The addition of a log message in the logout action also breaks tests, see 49afcb95.

@sbrunner, it would be great if you could take a look.

elemoine commented 12 years ago

The testing environment is currently broken. #25 fixes that. Once #25 is closed this particular issue can be tackled.

sbrunner commented 12 years ago

The second will be fixed in pull request #45.

The first one hasn't any relation with the commit 11528e1.

The test is broken long time before, because the entry/index need a working mapserverproxy.

Than the « request.route_url = lambda url: '/dummy/route/url' » can't work.

Any proposal to resolve it ?

CU Stéphane

elemoine commented 12 years ago

@sbrunner, if I comment out the the lines that set d['WFSTypes'] then the functional tests pass, so it is related to 11528e1, no?

sbrunner commented 12 years ago

Effectively, I'm just surprise that the line 214 : wms = WebMapService(wms_url, version='1.1.1') don't create an exception ...

elemoine commented 12 years ago

@bbinet introduced mocks for WebMapService. See test_index_no_auth for example.

elemoine commented 12 years ago

@sbrunner please tell me if you don't have time to work on that before the end of the week. I'll see what I can do.

sbrunner commented 12 years ago

effectively I don't have more time on this project

elemoine commented 12 years ago

f5728bf fixes the tests by mocking urllib.urlopen on which the WFSTypes code relies. We're in functional tests so we should probably do better here, but my goal here is to fix the tests.

Can I merge this?

elemoine commented 12 years ago

@bbinet suggested better mocking for urllib.urlopen. See 3a5c10e for the implementation.

elemoine commented 12 years ago

f5728bf and 3a5c10e are now in the master branch.