@@ -67,55 +67,53 @@ def test_commits(self, git):
6767
6868 @patch_object (Repo , '__init__' )
6969 @patch_object (Git , '_call_process' )
70- def test_init_bare (self , git , repo ):
70+ def test_init (self , git , repo ):
7171 git .return_value = True
7272 repo .return_value = None
7373
74- Repo .init_bare ("repos/foo/bar.git" )
74+ r = Repo .init ("repos/foo/bar.git" , bare = True )
75+ assert isinstance (r , Repo )
7576
7677 assert_true (git .called )
77- assert_equal (git .call_args , (('init' , '--bare' ), {}))
7878 assert_true (repo .called )
79- assert_equal (repo .call_args , (('repos/foo/bar.git' ,), {}))
8079
8180 @patch_object (Repo , '__init__' )
8281 @patch_object (Git , '_call_process' )
83- def test_init_bare_with_options (self , git , repo ):
82+ def test_init_with_options (self , git , repo ):
8483 git .return_value = True
8584 repo .return_value = None
8685
87- Repo .init_bare ("repos/foo/bar.git" , ** {'template' : "/baz/sweet" })
86+ r = Repo .init ("repos/foo/bar.git" , ** {'bare' : True ,'template' : "/baz/sweet" })
87+ assert isinstance (r , Repo )
8888
8989 assert_true (git .called )
90- assert_equal (git .call_args , (('init' , '--bare' ), {'template' : '/baz/sweet' }))
9190 assert_true (repo .called )
92- assert_equal (repo .call_args , (('repos/foo/bar.git' ,), {}))
9391
9492 @patch_object (Repo , '__init__' )
9593 @patch_object (Git , '_call_process' )
96- def test_fork_bare (self , git , repo ):
94+ def test_clone (self , git , repo ):
9795 git .return_value = None
9896 repo .return_value = None
9997
100- self .repo .fork_bare ("repos/foo/bar.git" )
98+ self .repo .clone ("repos/foo/bar.git" )
10199
102100 assert_true (git .called )
103101 path = os .path .join (absolute_project_path (), '.git' )
104- assert_equal (git .call_args , (('clone' , path , 'repos/foo/bar.git' ), {'bare' : True }))
102+ assert_equal (git .call_args , (('clone' , path , 'repos/foo/bar.git' ), {}))
105103 assert_true (repo .called )
106104
107105 @patch_object (Repo , '__init__' )
108106 @patch_object (Git , '_call_process' )
109- def test_fork_bare_with_options (self , git , repo ):
107+ def test_clone_with_options (self , git , repo ):
110108 git .return_value = None
111109 repo .return_value = None
112110
113- self .repo .fork_bare ("repos/foo/bar.git" , ** {'template' : '/awesome' })
111+ self .repo .clone ("repos/foo/bar.git" , ** {'template' : '/awesome' })
114112
115113 assert_true (git .called )
116114 path = os .path .join (absolute_project_path (), '.git' )
117115 assert_equal (git .call_args , (('clone' , path , 'repos/foo/bar.git' ),
118- {'bare' : True , 'template' : '/awesome' }))
116+ { 'template' : '/awesome' }))
119117 assert_true (repo .called )
120118
121119 @patch_object (Git , '_call_process' )
0 commit comments