@@ -0,0 +1,1444 @@
+from __future__ import unicode_literals%0A# Standard library imports%0Aimport json%0Aimport unittest%0A%0A# Local imports%0Afrom binstar_client.scripts.cli import main%0Afrom binstar_client.tests.fixture import CLITestCase%0Afrom binstar_client.tests.urlmock import urlpatch%0A%0Aclass Test(CLITestCase):%0A    @urlpatch%0A    def test_copy_label(self, urls):%0A        urls.register(method='GET', path='/channels/u1', content='%5B%22dev%22%5D')%0A        copy = urls.register(method='POST', path='/copy/package/u1/p1/1.0', content='%5B%7B%22basename%22: %22copied-file_1.0.tgz%22%7D%5D')%0A%0A        main(%5B'--show-traceback', 'copy', '--from-label', 'dev', '--to-label', 'release/xyz', 'u1/p1/1.0'%5D, False)%0A%0A        urls.assertAllCalled()%0A        req = json.loads(copy.req.body)%0A        self.assertEqual(req%5B'from_channel'%5D, 'dev')%0A        self.assertEqual(req%5B'to_channel'%5D, 'release/xyz')%0A%0A    @urlpatch%0A    def test_copy_channel(self, urls):%0A        urls.register(method='GET', path='/channels/u1', content='%5B%22dev%22%5D')%0A        copy = urls.register(method='POST', path='/copy/package/u1/p1/1.0', content='%5B%7B%22basename%22: %22copied-file_1.0.tgz%22%7D%5D')%0A%0A        main(%5B'--show-traceback', 'copy', '--from-channel', 'dev', '--to-channel', 'release/xyz', 'u1/p1/1.0'%5D, False)%0A%0A        urls.assertAllCalled()%0A        req = json.loads(copy.req.body)%0A        self.assertEqual(req%5B'from_channel'%5D, 'dev')%0A        self.assertEqual(req%5B'to_channel'%5D, 'release/xyz')%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

Add test for `anaconda copy`