majek / puka

Puka - the opinionated RabbitMQ client
https://github.com/majek/puka
Other
182 stars 34 forks source link

Small fixes to tests #29

Closed schmir closed 11 years ago

schmir commented 11 years ago

I'm currently playing around with the tests a bit, and need these small fixes to make them work for me.

majek commented 11 years ago

What's the difference?

-        client = puka.Client('amqp://does.not.resolve/')
+        client = puka.Client('amqp://256.256.256.256/')
majek commented 11 years ago

Also, why instead of setting AMQP_URL don't you just export it in your environement?

$ export AMQP_URL=amqp:///
$ <whatever command to run tests>

I tend to run make which does just that: https://github.com/majek/puka/blob/master/Makefile#L74

schmir commented 11 years ago

does.not.resolve resolves for me (my provider shows me some search page for domains with a typo. it resolves any address).

I'm too lazy to set AMQP_URL myself...and you're already using that default in other files.

Building that virtualenv inside your Makefile could also be done with tox (http://tox.testrun.org/latest/). I can provide a tox.ini file.

Do know about py.test? I think it could simplify some of your test code...it already is able to run it.