Closed rishabhKalakoti closed 5 years ago
As of now, its working fine on my repository. (installation also as tests)
@theSage21 I need help in better configuration settings for travis
. Also what tests should I add apart from testing that the web server is running well.
hmm. I'm in a fix here.
so ... I'll say let's do 2 things:
How do i check if a user is logged in? I got no idea how to handle cookies (they are part of browser) in testing (i will try googling). One fix I can do (not sure if it will work), is check for a user in database and then send form queries one by one as we do in the browser.
(if I asked for a contest is there some question in it?) Can I check the above directly in the database?
@theSage21 let's wrap this one here. I am a little busy and we are also changing the question/contest framework, so API tests can be covered after that. This one would be enough to setup CI with format check and server check. An admin will need to activate this repository for travis-ci to complete this.
@rishabhKalakoti why don't you set up travis for this repo. I've added you as an admin. Once you're done you can de-escalate your privileges to prevent accidental admin actions on the repo.
@theSage21 I will get it done on Saturday.
I made a custom CI configuration, not sure if this one is correct. I had a few problems.
pytest
had to be run inpipenv
. Therefore I had to add the installation commands (which I added underscripts
). I think they should not be added under scripts, I found another implementation on the web usingmake
, but could not implement it (made a lot of commits during testing so had to fork again, 'coz I got it messed up).server.py
first and thenpytest
, I think this can be done better, I found an implementation with https://pypi.org/project/WebTest/ which looks better to me. So I commented the tests and make ademo
test case withassert 1==1
travis-ci
would have to be added to PyJaipur/PyJudge by someone with admin access.Roadmap:
travis-ci
properlybottle
framework correctly (usingWebTest
maybe)This can be done in separate PRs too, because tests might mess things up :)
fixes #125