You can see the video on YouTube or here below:
I think they really did a great job with it and supplements my article well.read more
Let's say you have some Python application code which connects to Amazon S3 which retrieves the keys in a bucket. Very likely, the application would be using boto and the code would like this:
import boto def get_s3_conn(): return boto.connect_s3('<aws-access-key', '<aws-secret-key>') def list_keys(): s3_conn = get_s3_conn() b = s3_conn ...read more
Updated: Fixed typo in the last paragraph.
Today, I was curious to see this behavior of Mock() objects when using mock:
>>> from mock import Mock >>> m = Mock() >>> m.i_dont_exist <Mock name='mock.i_dont_exist' id='139841609578768'> >>> m.i_dont_exist() <Mock name='mock.i_dont_exist()' id='139841609106896'>
The above is expected, since I have ...read more
In this post, we shall take a look at the idea of data only containers - containers whose sole purpose is to exist on the docker host so that other containers can have portable access to a persistent data volume.
We will experiment ...
I have until the last few months (of my ~4 years of working with Python) always worked without virtualenv for all my Python projects. Why? I think I found the whole idea of having to do the following two steps before I work on something cumbersome:
Recently at work, I wanted to test a string which was being created by the urllib.urlencode() function. My first attempt was simple - test my expected string with that being created by the function above using unittest's assertEquals() function. It passed all the times I ran the tests before ...read more
My workflow with docker usually involves volume mounting a host directory so that I can read and write to the host directory from my container as a non-root user. On a Fedora 23 host with SELinux enabled, this is what I have to do differently:
Use: -v /var/dir1:var ...read more
« Page 2 / 3 »