Ejemplo n.º 1
0
Archivo: test_api.py Proyecto: nta/gdm
    def it_should_fail_on_invalid_repositories(config):
        os.system("mkdir deps && touch deps/gdm_1")

        with pytest.raises(InvalidRepository):
            gdm.lock()

        assert "<unknown>" not in config.__mapper__.text
Ejemplo n.º 2
0
Archivo: test_api.py Proyecto: nta/gdm
    def it_should_record_specified_dependencies(config):
        assert gdm.update(depth=1, lock=False)
        assert gdm.lock('gdm_1', 'gdm_3')

        assert CONFIG + strip("""
        sources_locked:
        - dir: gdm_1
          link: ''
          repo: https://github.com/jacebrowning/gdm-demo
          rev: eb37743011a398b208dd9f9ef79a408c0fc10d48
        - dir: gdm_3
          link: ''
          repo: https://github.com/jacebrowning/gdm-demo
          rev: 9bf18e16b956041f0267c21baad555a23237b52e
        """) == config.__mapper__.text
Ejemplo n.º 3
0
Archivo: test_api.py Proyecto: nta/gdm
    def it_should_record_all_versions_when_no_arguments(config):
        assert gdm.update(depth=1, lock=False)
        assert gdm.lock()

        assert CONFIG + strip("""
        sources_locked:
        - dir: gdm_1
          link: ''
          repo: https://github.com/jacebrowning/gdm-demo
          rev: eb37743011a398b208dd9f9ef79a408c0fc10d48
        - dir: gdm_2
          link: ''
          repo: https://github.com/jacebrowning/gdm-demo
          rev: 7bd138fe7359561a8c2ff9d195dff238794ccc04
        - dir: gdm_3
          link: ''
          repo: https://github.com/jacebrowning/gdm-demo
          rev: 9bf18e16b956041f0267c21baad555a23237b52e
        """) == config.__mapper__.text