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')
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')
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)