sapling/infinitepush/tests/teststore.py
Stanislau Hlebik 3569253ed8 infinitepush: lint fixes
Summary: {P56601586}

Test Plan: `cd fb-hgext/tests && python ../../hg-crew/tests/run-tests.py test-check-code-hg.t`

Reviewers: rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D3777586

Signature: t1:3777586:1472223173:56da05516a766422f16a5b61046cb8bd95bd67a4
2016-08-26 08:01:30 -07:00

18 lines
458 B
Python

from __future__ import absolute_import
from .util import getrepo, getfilebundlestore, getrandomid
from mercurial import ui
from .. import store
# tmpdir is some py.test magic!
def teststoreinit(tmpdir):
repo = getrepo(tmpdir)
store.filebundlestore(ui.ui(), repo)
def testwriteandread(tmpdir):
bundlestore = getfilebundlestore(tmpdir)
_id = getrandomid()
r = bundlestore.write(_id)
data = bundlestore.read(r)
assert _id == data