Skip to content

Instantly share code, notes, and snippets.

@selenamarie
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selenamarie/fec696bf042164ea123e to your computer and use it in GitHub Desktop.
Save selenamarie/fec696bf042164ea123e to your computer and use it in GitHub Desktop.
testing the dataservice_app.py
# start dataservice_app.py
socorro/dataservice/dataservice_app.py
# insert these into postgresql:
insert into bugs values (1, 'done', 'good', 'stuff');
insert into bug_associations values (1, 'a signature');
# test POST
(socorro-virtualenv)[vagrant@localhost ~]$ curl --data "bug_ids=1" http://localhost:8883/bugs/
{"hits": [{"id": 1, "signature": "a signature"}], "total": 1}(socorro-virtualenv)[vagrant@localhost ~]$
@peterbe
Copy link

peterbe commented Nov 17, 2014

socorro_integration_test=# insert into bugs values (1, 'done', 'good', 'stuff');
INSERT 0 1
socorro_integration_test=# insert into bug_associations (1, 'a signature');
ERROR:  syntax error at or near "1"
LINE 1: insert into bug_associations (1, 'a signature');

@peterbe
Copy link

peterbe commented Nov 17, 2014

The error was because it has to be

 insert into bugs values (1, 'done', 'good', 'stuff');
insert into bug_associations values (1, 'a signature');

@selenamarie
Copy link
Author

Thanks! Sorry about that, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment