Skip to content

Commit 5155552

Browse files
committed
Add more tests
1 parent 634f9b6 commit 5155552

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/unit/test_projects.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,15 @@ def test_create_delete() -> None:
5454
"""test_create_delete"""
5555
proj = projects.Project.create(endpoint=tutil.SQ, key=tutil.TEMP_KEY, name="temp")
5656
assert proj.key == tutil.TEMP_KEY
57+
assert proj.main_branch_name() == "main"
5758
if tutil.SQ.edition() != c.CE:
5859
assert proj.main_branch().name == "main"
5960
proj.rename_main_branch("foobar")
6061
assert proj.main_branch().name == "foobar"
6162
else:
62-
assert proj.main_branch_name() == "main"
63+
with pytest.raises(exceptions.UnsupportedOperation):
64+
proj.main_branch()
65+
6366
assert proj.delete()
6467
with pytest.raises(exceptions.ObjectNotFound):
6568
proj.refresh()

0 commit comments

Comments
 (0)