Exemplo n.º 1
0
    def test_can_define_the_output_directory(self):
        main(['--target-dir', 'file'])
        self.assert_arguments(self.MockedClient)

        self.mocked_open.assert_called_with('file/index.html',
                                            'w',
                                            encoding='utf-8')
Exemplo n.º 2
0
    def test_can_define_the_output_directory(self):
        main(['--target-dir', 'file'])
        self.assert_arguments(self.MockedClient)

        self.mocked_open.assert_called_with('file/index.html', 'w')
Exemplo n.º 3
0
 def test_can_define_the_auth_credentials(self):
     main(['--auth', 'user:pass'])
     self.assert_arguments(self.MockedClient, auth=('user', 'pass'))
Exemplo n.º 4
0
 def test_can_define_the_plugins_collection(self):
     main(['--bucket', 'bucket',
           '--plugins-collection', 'collection'])
     self.assert_arguments(self.MockedClient,
                           bucket='bucket',
                           plugins_collection='collection')
Exemplo n.º 5
0
 def test_main_custom_server(self):
     main(['-s', 'http://yeah'])
     self.assert_arguments(self.MockedClient, kinto_server='http://yeah')
Exemplo n.º 6
0
 def test_main_default(self):
     # let's check that main() parsing uses our defaults
     main([])
     self.assert_arguments(self.MockedClient)
 def test_can_define_the_auth_credentials(self):
     main(['--auth', 'user:pass'])
     self.assert_arguments(self.MockedClient, auth=('user', 'pass'))
 def test_can_define_the_plugins_collection(self):
     main(['--bucket', 'bucket',
           '--plugins-collection', 'collection'])
     self.assert_arguments(self.MockedClient,
                           bucket='bucket',
                           plugins_collection='collection')
 def test_main_custom_server(self):
     main(['-s', 'http://yeah'])
     self.assert_arguments(self.MockedClient, kinto_server='http://yeah')
 def test_main_default(self):
     # let's check that main() parsing uses our defaults
     main([])
     self.assert_arguments(self.MockedClient)