Beispiel #1
0
 def test_too_new_branch_name(self, monkeypatch):
     branch = 'ceph-4.0-ubuntu'
     monkeypatch.setattr('rhcephpkg.util.current_branch', lambda: branch)
     with pytest.raises(NotImplementedError):
         assert get_distro()
Beispiel #2
0
 def test_bad_branch_name(self, monkeypatch):
     branch = 'bad-branch'
     monkeypatch.setattr('rhcephpkg.util.current_branch', lambda: branch)
     with pytest.raises(IndexError):
         assert get_distro()
Beispiel #3
0
 def test_branch_name(self, monkeypatch, branch, expected):
     monkeypatch.setattr('rhcephpkg.util.current_branch', lambda: branch)
     assert get_distro() == expected
Beispiel #4
0
 def test_too_new_branch_name(self, monkeypatch):
     branch = 'ceph-4.0-ubuntu'
     monkeypatch.setattr('rhcephpkg.util.current_branch', lambda: branch)
     with pytest.raises(NotImplementedError):
         assert get_distro()
Beispiel #5
0
 def test_bad_branch_name(self, monkeypatch):
     branch = 'bad-branch'
     monkeypatch.setattr('rhcephpkg.util.current_branch', lambda: branch)
     with pytest.raises(IndexError):
         assert get_distro()
Beispiel #6
0
 def test_branch_name(self, monkeypatch, branch, expected):
     monkeypatch.setattr('rhcephpkg.util.current_branch', lambda: branch)
     assert get_distro() == expected