Esempio n. 1
0
def test_getreleases_empty(monkeypatch):
    def read(path, recursive=True):
        assert path == "appr/packages/ant31/rocketchat/releases.json"
        data = {'channels': {}, "releases": {}}
        return MockEtcdResult(path, data)

    monkeypatch.setattr("appr.models.kv.etcd.etcd_client.read", read)
    assert Package.all_releases("ant31/rocketchat") == []
Esempio n. 2
0
def test_getreleases(getreleases):
    assert sorted(Package.all_releases("ant31/rocketchat")) == sorted(
        ['1.3.0', '1.3.2-rc2', '1.8.2-rc2', '1.4.2', '1.0.0', '1.2.0'])