Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 296544a

Browse filesBrowse files
chore: add test case to branch name with period works
Add a test case to show that a branch name with a period can be fetched with a `get()` Closes: #1715
1 parent 80754a1 commit 296544a
Copy full SHA for 296544a

File tree

Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Open diff view settings
Collapse file
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
GitLab API:
3+
https://docs.gitlab.com/ee/api/branches.html
4+
"""
5+
6+
7+
def test_branch_name_with_period(project):
8+
# Make sure we can create and get a branch name containing a period '.'
9+
branch_name = "my.branch.name"
10+
branch = project.branches.create({"branch": branch_name, "ref": "main"})
11+
assert branch.name == branch_name
12+
13+
# Ensure we can get the branch
14+
fetched_branch = project.branches.get(branch_name)
15+
assert branch.id == fetched_branch.id
16+
17+
branch.delete()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.