def qos_semantics_matches_spec(self, connection): try: props = connection.server_properties except AttributeError: warnings.warn(UserWarning(W_VERSION)) else: if props.get('product') == 'RabbitMQ': return version_string_as_tuple(props['version']) < (3, 3) return True
def test_versions(self): self.assertTupleEqual( version_string_as_tuple('3'), version_info_t(3, 0, 0, '', ''), ) self.assertTupleEqual( version_string_as_tuple('3.3'), version_info_t(3, 3, 0, '', ''), ) self.assertTupleEqual( version_string_as_tuple('3.3.1'), version_info_t(3, 3, 1, '', ''), ) self.assertTupleEqual( version_string_as_tuple('3.3.1a3'), version_info_t(3, 3, 1, 'a3', ''), ) self.assertTupleEqual( version_string_as_tuple('3.3.1a3-40c32'), version_info_t(3, 3, 1, 'a3', '40c32'), ) self.assertEqual( version_string_as_tuple('3.3.1.a3.40c32'), version_info_t(3, 3, 1, 'a3', '40c32'), )
def qos_semantics_matches_spec(self, connection): props = connection.server_properties if props.get("product") == "RabbitMQ": return version_string_as_tuple(props["version"]) < (3, 3) return True
def qos_semantics_matches_spec(self, connection): props = connection.server_properties if props.get('product') == 'RabbitMQ': return version_string_as_tuple(props['version']) < (3, 3) return True
def test_version_string_as_tuple(version, expected): assert version_string_as_tuple(version) == expected