mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-05 23:20:19 +00:00
1 line
2.7 KiB
JSON
1 line
2.7 KiB
JSON
[{"user_id": 275, "stars": [], "topic_id": 41601, "date_created": 1310330527.553128, "message": "I see in the djcelerey docs how to write tests that *run* tasks", "group_id": 81, "id": 1606369}, {"user_id": 275, "stars": [], "topic_id": 41601, "date_created": 1310330512.4433081, "message": "I'm trying to write a test that will make sure that a django view successfully adds a task to celery.", "group_id": 81, "id": 1606367}, {"user_id": 275, "stars": [], "topic_id": 41601, "date_created": 1310330595.8239739, "message": "I'm using the redis backend - am I going to need to use the redis api to check the queue or something?", "group_id": 81, "id": 1606376}, {"user_id": 275, "stars": [], "topic_id": 41601, "date_created": 1310330551.980118, "message": "but not necessarily how to confirm that the correct task was added to the queue", "group_id": 81, "id": 1606371}, {"user_id": 257, "stars": [], "topic_id": 41601, "date_created": 1310392502.855077, "message": "In unit testing you assume that this part is covered by the celery test suite. If you really want to you can use Task.get_consumer(); Task.get_consumer().get() is not None", "group_id": 81, "id": 1612096}, {"user_id": 33202, "stars": [], "topic_id": 41601, "date_created": 1310395323.882911, "message": "it sounds like you're testing celery and not your code -- you should probably be checking that your code was run and did what it was supposed to rather than making sure that celery works. if you simply want to see how many time a task was queued, maybe consider a wrapper function that increments a counter?", "group_id": 81, "id": 1612503}, {"user_id": 1126, "stars": [], "topic_id": 41601, "date_created": 1310397107.194921, "message": "I'm assuming you're talking about an integration test and not a unit test", "group_id": 81, "id": 1612841}, {"user_id": 1126, "stars": [], "topic_id": 41601, "date_created": 1310397138.6144569, "message": "For unit tests you should be mocking out redis (so that your code assumes that redis always works fine), and only test the functions you're writing", "group_id": 81, "id": 1612849}, {"user_id": 1126, "stars": [], "topic_id": 41601, "date_created": 1310397357.946141, "message": "for an integration test, yeah I'd fire up redis' api to confirm that stuff is in there that should be", "group_id": 81, "id": 1612882}, {"user_id": 1736, "stars": [], "topic_id": 41601, "date_created": 1310447535.8141479, "message": "Just use CELERY_ALWAYS_EAGER and a mock.", "group_id": 81, "id": 1618052}, {"user_id": 212, "stars": [], "topic_id": 41601, "date_created": 1310448647.708818, "message": "@coderanger a mock for what?", "group_id": 81, "id": 1618093}, {"user_id": 1736, "stars": [], "topic_id": 41601, "date_created": 1310834736.6534679, "message": "@gg For the task.", "group_id": 81, "id": 1652626}] |