From: Alfredo Deza Date: Tue, 23 Sep 2014 16:56:17 +0000 (-0400) Subject: add tests for the grep utilities in remotes X-Git-Tag: v1.5.16~8^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2f05473059c41725c6ddb5fbc0bd36156f93245f;p=ceph-deploy.git add tests for the grep utilities in remotes Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/tests/unit/hosts/test_remotes.py b/ceph_deploy/tests/unit/hosts/test_remotes.py new file mode 100644 index 0000000..ca428d0 --- /dev/null +++ b/ceph_deploy/tests/unit/hosts/test_remotes.py @@ -0,0 +1,16 @@ +from cStringIO import StringIO + +from ceph_deploy.hosts import remotes + + +class TestObjectGrep(object): + + def setup(self): + self.file_object = StringIO('foo\n') + self.file_object.seek(0) + + def test_finds_term(self): + assert remotes.object_grep('foo', self.file_object) + + def test_does_not_find_anything(self): + assert remotes.object_grep('bar', self.file_object) is False