mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-20 23:20:57 +00:00
1 line
6.0 KiB
JSON
1 line
6.0 KiB
JSON
[{"user_id": 12577, "stars": [], "topic_id": 7642, "date_created": 1298208973.982199, "message": "has anyone done this? the whole oauth flow looks like it will be very difficult to model with oauth. I want to do oauth to facebook and to yahoo. I can write some selenium to do it of course... but that's very slow compared to django unit test.", "group_id": 81, "id": 153506}, {"user_id": 8017, "stars": [], "topic_id": 7642, "date_created": 1298209461.0779099, "message": "Facebook recently introduced a test users feature that is helpful for automated testing", "group_id": 81, "id": 153565}, {"user_id": 8017, "stars": [{"date_created": 1298212899.4894221, "user_id": 11827}], "topic_id": 7642, "date_created": 1298209462.6606071, "message": "http://developers.facebook.com/docs/test_users/", "group_id": 81, "id": 153566}, {"user_id": 12577, "stars": [], "topic_id": 7642, "date_created": 1298209017.969578, "message": "I guess the only way to do it would be to use some mock oauth service, but I'm not sure how to go about making that. Anyone done this or have any ideas?", "group_id": 81, "id": 153509}, {"user_id": 12577, "stars": [], "topic_id": 7642, "date_created": 1298209616.6342709, "message": "that's true. it's very useful. but it doesn't solve the oauth problem does it? it does mean we can write effective selenium tests for facebook.", "group_id": 81, "id": 153575}, {"user_id": 1822, "stars": [{"date_created": 1298216129.8390391, "user_id": 12577}], "topic_id": 7642, "date_created": 1298214023.118516, "message": "working on this same problem - not simple. You have to decide how low a level you are wanting to test. This server looks useful: http://term.ie/oauth/example/", "group_id": 81, "id": 153684}, {"user_id": 1822, "stars": [], "topic_id": 7642, "date_created": 1298214616.6960299, "message": "hmm - this section referenced from the test_users docs doesn't seem to exist anymore, anyone know a replacement: http://developers.facebook.com/docs/authentication/#authenticating-as-an-application", "group_id": 81, "id": 153720}, {"user_id": 12577, "stars": [], "topic_id": 7642, "date_created": 1298216336.8343019, "message": "I've been thinking about doing that - mocking everything. does mockito make that especially easy? the trouble with the approach is that you're not testing anything. you mock facebook and then facebook changes subtley and you don't know till you go live. I guess you have to have selenium higher up and then the mocking shows that you're not breaking it and the selenium shows that they're not breaking it.", "group_id": 81, "id": 153840}, {"user_id": 1822, "stars": [], "topic_id": 7642, "date_created": 1298216522.2125061, "message": "@peplin is your code posted anywhere?", "group_id": 81, "id": 153848}, {"user_id": 927, "stars": [], "topic_id": 7642, "date_created": 1298214978.146826, "message": "@nicferrier Depends on your goals: I have a project which uses the Google Translator Toolkit and ended up using Mock pretty extensively (thank you @voidspace!) to fake the server interaction, which went pretty well. The downside is that it won't catch something Google's server response changing", "group_id": 81, "id": 153747}, {"user_id": 927, "stars": [], "topic_id": 7642, "date_created": 1298217124.213614, "message": "@nicferrier The main advantage is that mocking allows you to test your full codebase quickly without an internet dependency; I'd still want other tests for the full path but it's slower and the value of running those test every commit is small since your code is far more likely to break than Facebook's auth service", "group_id": 81, "id": 153892}, {"user_id": 12577, "stars": [], "topic_id": 7642, "date_created": 1298216340.739718, "message": "I guess that makes sense.", "group_id": 81, "id": 153842}, {"user_id": 12577, "stars": [], "topic_id": 7642, "date_created": 1298217208.1440151, "message": "@acdha yeah. I get it. you're right, it's the best thing to do. I guess I'm going to have to take the plunge. I am fearful of the amount of work involved in supporting the mock since facebook seems to be changing under our feet almost weekly. hey ho.", "group_id": 81, "id": 153901}, {"user_id": 3160, "stars": [], "topic_id": 7642, "date_created": 1298216205.213573, "message": "I use mockito-python to imitate Facebook's OAuth responses, it works pretty well. The testing just involves sending different data to your OAuth callback URL.", "group_id": 81, "id": 153826}, {"user_id": 3160, "stars": [], "topic_id": 7642, "date_created": 1298219977.777458, "message": "OAuth 1 won't change from underneath you, thankfully. Facebook implements a draft of OAuth 2, so it could change, but it hasn't since they rolled it out.", "group_id": 81, "id": 154097}, {"user_id": 3160, "stars": [{"date_created": 1299011164.1609571, "user_id": 6396}], "topic_id": 7642, "date_created": 1298220007.0805521, "message": "@ptone We're actually mocking the oauth_access package, but if it helps: https://gist.github.com/836086", "group_id": 81, "id": 154098}, {"user_id": 12577, "stars": [], "topic_id": 7642, "date_created": 1298224089.862294, "message": "no, oauth won't change. but the graph api will and does. and we'll need to mock all of it if we mock the oauth, of course. it's still doable I just anticipate lots of \"it was working on my machine\" type problems because facebook data changes.", "group_id": 81, "id": 154250}, {"user_id": 1822, "stars": [], "topic_id": 7642, "date_created": 1298990616.531765, "message": "@peplin bringing this back up - how do you get a more functional test to use your mock object? If I want to test a view, that instantiates OAuthAccess - how would I get it to use my mock without making the class or object a parameter?", "group_id": 81, "id": 235100}, {"user_id": 3160, "stars": [], "topic_id": 7642, "date_created": 1299021813.417187, "message": "@ptone if I understand you correctly, you just need to do the mocking in the setUp method of your functional test. mockito, and I'm sure other mocking frameworks as well, can mock any future instantiation of the object.", "group_id": 81, "id": 241678}] |