{"comment":{"url":"https://api.github.com/repos/ahelium/monthlyrep/comments/9780834","html_url":"https://github.com/ahelium/monthlyrep/commit/a4e0f46f120c365ddf02270da30af6b0ee975140#commitcomment-9780834","id":9780834,"user":{"login":"anxiousmodernman","id":396004,"avatar_url":"https://avatars.githubusercontent.com/u/396004?v=3","gravatar_id":"","url":"https://api.github.com/users/anxiousmodernman","html_url":"https://github.com/anxiousmodernman","followers_url":"https://api.github.com/users/anxiousmodernman/followers","following_url":"https://api.github.com/users/anxiousmodernman/following{/other_user}","gists_url":"https://api.github.com/users/anxiousmodernman/gists{/gist_id}","starred_url":"https://api.github.com/users/anxiousmodernman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anxiousmodernman/subscriptions","organizations_url":"https://api.github.com/users/anxiousmodernman/orgs","repos_url":"https://api.github.com/users/anxiousmodernman/repos","events_url":"https://api.github.com/users/anxiousmodernman/events{/privacy}","received_events_url":"https://api.github.com/users/anxiousmodernman/received_events","type":"User","site_admin":false},"position":45,"line":45,"path":"tests/queries_test.py","commit_id":"a4e0f46f120c365ddf02270da30af6b0ee975140","created_at":"2015-02-17T15:31:47Z","updated_at":"2015-02-17T15:31:47Z","body":"Yeah, this is hard. And it's a case where it's better to have a test database.\r\n\r\nYou can test against a different table, a dupe, if you need to. It's a pain, but testing with the database is always a pain.\r\n\r\nIt's common in tests like these to have some helper class/module that just sets up a test database if you need to.\r\n\r\nFinally, these tests may not be needed in the _long run_. You need them right now because you're still figuring out how SQLAlchemy works, and that's great. This is a great way to do that.\r\n\r\nBut you don't need to test _that_ it works. You can trust the developers of the library to do things right and give you a library that works. What you _will_ need to test is your logic that updates and maps new campaign tags. That's custom stuff, and only you will know whether it works or not."}}