@@ -73,6 +73,7 @@ def fake_repository_clone_func(self, directory, name, non_ff=False):
73
73
def create_fake_repository (self , directory , non_ff = False ):
74
74
self .run_cmd ("git init ." , directory )
75
75
self .run_cmd ("git checkout -b master" , directory )
76
+ assert self .
fedora .
set_git_credentials (
directory ,
"Name" ,
"[email protected] " )
76
77
spec_content = Path (__file__ ).parent .joinpath ("src/example.spec" ).read_text ()
77
78
Path (directory ).joinpath ("example.spec" ).write_text (spec_content )
78
79
self .run_cmd ("git add ." , directory )
@@ -93,6 +94,8 @@ def new_release(self):
93
94
'commitish' : '' ,
94
95
'author_name' : 'John Doe' ,
95
96
'author_email' :
'[email protected] ' ,
97
+ 'commit_name' : 'Testy McTestFace' ,
98
+ 'commit_email' :
'[email protected] ' ,
96
99
'python_versions' : [3 ],
97
100
'fedora_branches' : ["f28" ],
98
101
'fedora' : True ,
@@ -163,7 +166,7 @@ def package(self):
163
166
164
167
@pytest .fixture
165
168
def non_existent_path (self , tmpdir ):
166
- path = Path (str (tmpdir ))/ 'fooo'
169
+ path = Path (str (tmpdir )) / 'fooo'
167
170
return str (path )
168
171
169
172
@pytest .fixture
@@ -177,8 +180,8 @@ def fake_repository(self, tmpdir):
177
180
178
181
@pytest .fixture
179
182
def example_spec (self , tmpdir ):
180
- spec_content = (Path (__file__ ).parent / "src/example.spec" ).read_text ()
181
- spec = Path (str (tmpdir ))/ "example.spec"
183
+ spec_content = (Path (__file__ ).parent / "src/example.spec" ).read_text ()
184
+ spec = Path (str (tmpdir )) / "example.spec"
182
185
spec .write_text (spec_content )
183
186
return str (spec )
184
187
@@ -220,8 +223,8 @@ def test_wrong_dir_lint(self, non_existent_path):
220
223
221
224
def test_clone (self , tmp , package , fake_clone ):
222
225
directory = Path (self .fedora .fedpkg_clone_repository (tmp , package ))
223
- assert (directory / f"{ package } .spec" ).is_file ()
224
- assert (directory / ".git" ).is_dir ()
226
+ assert (directory / f"{ package } .spec" ).is_file ()
227
+ assert (directory / ".git" ).is_dir ()
225
228
226
229
def test_switch_branch (self , fake_repository ):
227
230
self .fedora .fedpkg_switch_branch (fake_repository , "f28" , False )
@@ -230,7 +233,7 @@ def test_switch_branch(self, fake_repository):
230
233
assert "master" == self .run_cmd ("git rev-parse --abbrev-ref HEAD" , fake_repository ).stdout .strip ()
231
234
232
235
def test_commit (self , fake_repository ):
233
- spec_path = fake_repository / "example.spec"
236
+ spec_path = fake_repository / "example.spec"
234
237
spec_content = spec_path .read_text () + "\n Test test"
235
238
spec_path .write_text (spec_content )
236
239
@@ -244,7 +247,7 @@ def test_lint(self, tmp, package, fake_clone):
244
247
directory = Path (self .fedora .fedpkg_clone_repository (tmp , package ))
245
248
assert self .fedora .fedpkg_lint (str (directory ), "master" , False )
246
249
247
- spec_path = directory / f"{ package } .spec"
250
+ spec_path = directory / f"{ package } .spec"
248
251
with spec_path .open ('r+' ) as spec_file :
249
252
spec = spec_file .read () + "\n Test test"
250
253
spec_file .write (spec )
@@ -263,7 +266,7 @@ def test_spectool(self, tmp, package, fake_clone):
263
266
assert file_number != len (os .listdir (directory ))
264
267
265
268
def test_workflow (self , fake_repository ):
266
- spec_path = fake_repository / "example.spec"
269
+ spec_path = fake_repository / "example.spec"
267
270
spec_content = spec_path .read_text () + "\n Test test"
268
271
spec_path .write_text (spec_content )
269
272
0 commit comments