File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636from cassandra .pool import Host
3737from cassandra .policies import SimpleConvictionPolicy , ConvictionPolicy
3838from cassandra .util import Date , Time
39+ from cassandra .metadata import Token
3940
4041
4142class TypeTests (unittest .TestCase ):
@@ -371,3 +372,18 @@ def test_timer_order(self):
371372 self ._check_sequence_consistency (time_from_string_equal , True )
372373
373374 self ._check_sequence_consistency (self ._shuffle_lists (time_from_int , time_from_datetime , time_from_string ))
375+
376+ def test_token_order (self ):
377+ """
378+ Test Token class is ordered consistently
379+
380+ @since 3.9
381+ @jira_ticket PYTHON-714
382+ @expected_result the tokens are ordered correctly
383+
384+ @test_category data_types
385+ """
386+ tokens = [Token (1 ), Token (2 ), Token (3 ), Token (4 )]
387+ tokens_equal = [Token (1 ), Token (1 )]
388+ self ._check_sequence_consistency (tokens )
389+ self ._check_sequence_consistency (tokens_equal , True )
You can’t perform that action at this time.
0 commit comments