def test_getters_empty(self): data = {'vcs': 'svn', 'vcs_uri': 'https://code.ros.org/svn/ros-pkg'} self.assertEqual('', locate.get_www(None, data, None)) self.assertEqual('', locate.get_repo(None, data, None)) self.assertEqual('https://code.ros.org/svn/ros-pkg', locate.get_vcs_uri_for_branch(data)) self.assertEqual('https://code.ros.org/svn/ros-pkg', locate.get_vcs_uri_for_branch(data, 'release')) self.assertEqual('https://code.ros.org/svn/ros-pkg', locate.get_vcs_uri_for_branch(data, 'devel')) self.assertEqual('svn', locate.get_vcs(None, data, None)) self.assertEqual('- svn:\n local-name: myname\n uri: https://code.ros.org/svn/ros-pkg\n', locate.get_rosinstall('myname', data, 'mytype')) self.assertEqual('- svn:\n local-name: myname\n uri: https://code.ros.org/svn/ros-pkg\n', locate.get_rosinstall('myname', data, 'mytype', 'devel')) self.assertEqual('- svn:\n local-name: myname\n uri: https://code.ros.org/svn/ros-pkg\n', locate.get_rosinstall('myname', data, 'mytype', 'release')) self.assertEqual('- svn:\n local-name: foo/myname\n uri: https://code.ros.org/svn/ros-pkg\n', locate.get_rosinstall('myname', data, 'mytype', None, 'foo')) self.assertEqual('https://code.ros.org/svn/ros-pkg', locate.get_vcs_uri(data)) self.assertEqual('', locate.get_vcs_version(data)) self.assertEqual('package', locate.get_type(data))
def test_getters(self): data = {'package_type': 'package', 'repo_name': 'visualization', 'repo_url': '', 'srvs': [], 'timestamp': 1362233859.0088351, 'url': 'http://ros.org/wiki/rviz', 'vcs': 'svn', 'vcs_uri': 'https://code.ros.org/svn/ros-pkg', 'vcs_version': '0.1', 'repository': 'navigation'} self.assertEqual('http://ros.org/wiki/rviz', locate.get_www(None, data, None)) self.assertEqual('navigation', locate.get_repo(None, data, None)) self.assertEqual( '- svn:\n local-name: foo/myname\n uri: https://code.ros.org/svn/ros-pkg\n version: \'0.1\'\n', locate.get_rosinstall('myname', data, 'mytype', None, 'foo')) self.assertEqual('https://code.ros.org/svn/ros-pkg', locate.get_vcs_uri(data)) self.assertEqual('0.1', locate.get_vcs_version(data)) self.assertEqual('package', locate.get_type(data))
def test_getters(self): data = {'package_type': 'package', 'repo_name': 'visualization', 'repo_url': '', 'srvs': [], 'timestamp': 1362233859.0088351, 'url': 'http://ros.org/wiki/rviz', 'vcs': 'svn', 'vcs_uri': 'https://code.ros.org/svn/ros-pkg', 'vcs_version': '0.1', 'repository': 'navigation'} self.assertEqual('http://ros.org/wiki/rviz', locate.get_www(None, data, None)) self.assertEqual('visualization', locate.get_repo(None, data, None)) self.assertEqual( '- svn:\n local-name: foo/myname\n uri: https://code.ros.org/svn/ros-pkg\n version: \'0.1\'\n', locate.get_rosinstall('myname', data, 'mytype', None, 'foo')) self.assertEqual('https://code.ros.org/svn/ros-pkg', locate.get_vcs_uri(data)) self.assertEqual('0.1', locate.get_vcs_version(data)) self.assertEqual('package', locate.get_type(data))