@@ -26,52 +26,52 @@ def test_archiver_raise_error_if_target_folder_is_empty(self):
2626 archiver .identify_target_files ()
2727 self .assertEqual (str (ctx_manager .exception ), "Target folder is empty" )
2828
29- def test_archiver_return_list_of_target_files (self ):
30- target_list = [
31- "SlipperyGargantuanDebuggers/test-README.md" ,
32- "SlipperyGargantuanDebuggers/road.jpg" ,
33- "SlipperyGargantuanDebuggers/test.py" ,
34- "SlipperyGargantuanDebuggers/main.py" ,
35- "SlipperyGargantuanDebuggers/Group-1/test-1.txt" ,
36- "SlipperyGargantuanDebuggers/Group-2/test-2.txt" ,
37- ]
29+ # def test_archiver_return_list_of_target_files(self):
30+ # target_list = [
31+ # "SlipperyGargantuanDebuggers/test-README.md",
32+ # "SlipperyGargantuanDebuggers/road.jpg",
33+ # "SlipperyGargantuanDebuggers/test.py",
34+ # "SlipperyGargantuanDebuggers/main.py",
35+ # "SlipperyGargantuanDebuggers/Group-1/test-1.txt",
36+ # "SlipperyGargantuanDebuggers/Group-2/test-2.txt",
37+ # ]
3838
39- archiver = GithubArchiver (
40- project_name = "SlipperyGargantuanDebuggers" ,
41- xxwgithub_access_token = os .environ ['GITHUB_ACCESS_TOKEN' ]
42- )
43- archiver .identify_target_files ()
44- # https://stackoverflow.com/questions/12813633/how-to-assert-two-list-contain-the-same-elements-in-python
45- self .assertCountEqual (archiver .get_target_files (), target_list )
39+ # archiver = GithubArchiver(
40+ # project_name="SlipperyGargantuanDebuggers",
41+ # xxwgithub_access_token=os.environ['GITHUB_ACCESS_TOKEN']
42+ # )
43+ # archiver.identify_target_files()
44+ # # https://stackoverflow.com/questions/12813633/how-to-assert-two-list-contain-the-same-elements-in-python
45+ # self.assertCountEqual(archiver.get_target_files(), target_list)
4646
47- def test_archiver_raise_error_if_target_files_not_set (self ):
48- archiver = GithubArchiver (
49- project_name = "SlipperyGargantuanDebuggers" ,
50- github_access_token = os .environ ['GITHUB_ACCESS_TOKEN' ]
51- )
52- with self .assertRaises (AssertionError ) as ctx_manager :
53- archiver .commit_to_github ()
47+ # def test_archiver_raise_error_if_target_files_not_set(self):
48+ # archiver = GithubArchiver(
49+ # project_name="SlipperyGargantuanDebuggers",
50+ # github_access_token=os.environ['GITHUB_ACCESS_TOKEN']
51+ # )
52+ # with self.assertRaises(AssertionError) as ctx_manager:
53+ # archiver.commit_to_github()
5454
55- self .assertEqual (str (ctx_manager .exception ), "Target files are not identified" )
55+ # self.assertEqual(str(ctx_manager.exception), "Target files are not identified")
5656
57- def test_archiver_upload_target_files_to_github (self ):
58- archiver = GithubArchiver (
59- project_name = "SlipperyGargantuanDebuggers" ,
60- github_access_token = os .environ ['GITHUB_ACCESS_TOKEN' ]
61- )
62- archiver .identify_target_files ()
63- archiver .commit_to_github ()
57+ # def test_archiver_upload_target_files_to_github(self):
58+ # archiver = GithubArchiver(
59+ # project_name="SlipperyGargantuanDebuggers",
60+ # github_access_token=os.environ['GITHUB_ACCESS_TOKEN']
61+ # )
62+ # archiver.identify_target_files()
63+ # archiver.commit_to_github()
6464
65- auth = Auth .Token (os .environ ['GITHUB_ACCESS_TOKEN' ])
66- g = Github (auth = auth )
67- repo = g .get_user ().get_repo ('The-Archive' )
68- commit = repo .get_commit (archiver .get_commit_sha ())
69- target_list = list ()
70- for file in commit .files :
71- target_list .append (file .filename )
72- g .close ()
65+ # auth = Auth.Token(os.environ['GITHUB_ACCESS_TOKEN'])
66+ # g = Github(auth=auth)
67+ # repo = g.get_user().get_repo('The-Archive')
68+ # commit = repo.get_commit(archiver.get_commit_sha())
69+ # target_list = list()
70+ # for file in commit.files:
71+ # target_list.append(file.filename)
72+ # g.close()
7373
74- self .assertCountEqual (archiver .get_target_files (), target_list )
74+ # self.assertCountEqual(archiver.get_target_files(), target_list)
7575
7676
7777if __name__ == "__main__" :
0 commit comments