-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Title Search #138
Title Search #138
Conversation
hi @punchagan, had a question about testing this; I see there's a helper method I could see manually creating post titles and then counting the ones returned from the search as a viable test. If that's adequate I can try that. |
Update: I wrote a small test using the method I mentioned but it looks like maybe the test runner uses SQLite3 for the runner? I'm using a
|
@stanzheng This is good work. 👍 Thank you for your time, and the PR.
That would be good for a start, I think. Just testing that a search results the right results, and an invalid search doesn't return results.
I think we should switch the test runner to run on postgres. I probably started using sqlite to make testing faster, because some of them can take a while. The other option could be to use Postgres only for these tests. I won't be able to look into this until early next week. So, if you'd like to, explore one of the options and see how it goes? |
@punchagan thank you for weighing back in; It was end of batch this week so got wrapped up in a new project and going home. I would love your help on putting the tests and postgres config; I'm not that experienced with Django would enjoy your help with reviewing the the code and making the config changes so all the past tests don't break 😄. |
@stanzheng Looks like you forgot to commit |
Ah sorry @punchagan! i was doing some weird cherry picking because I needed #137 to actively develop on my machine. Let me make sure |
ended up in a bit of git-fusion with cherry-picking my dev branch that I did all the work ontop of. I ended up just pushing everything including my other branch #137 |
@punchagan I pushed up all of my latest; I'm unsure how the test database blog titles generate their titles to search for them. It looks like Lorem Ipsum but unsure if it's the same each time.
|
Thanks for your work on this @stanzheng! I've merged your code in a separate PR along with a single test. Feel free to add more tests, or work on further improvements. I would be happy to help! |
WIP; Addresses #104
URL bar = http://localhost:8000/search/?q=google