Esempio n. 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()
Esempio n. 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()
Esempio n. 3
0
 def test_branch_name(self, monkeypatch, branch, expected):
     monkeypatch.setattr('rhcephpkg.util.current_branch', lambda: branch)
     assert get_distro() == expected
Esempio n. 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()
Esempio n. 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()
Esempio n. 6
0
 def test_branch_name(self, monkeypatch, branch, expected):
     monkeypatch.setattr('rhcephpkg.util.current_branch', lambda: branch)
     assert get_distro() == expected