#3666 Fix usage of str.decode() in our tests
Closed: Fixed a year ago Opened a year ago by jhrozek.

There are some occurences of str.decode() in our tests, which are not compatible with Python3. We should fix those.


Lukas tols me that this original assumption was not correct. This issue with python3 is not caused by how the decode method is currently used but that it is not used.

The actual error looks like:

_______________________________________________________________________________________________________ test_sss_cache_invalidate_user _______________________________________________________________________________________________________
Traceback (most recent call last):                                                                                                                                                                                                           
  File "/home/build/sssd/src/tests/intg/test_ts_cache.py", line 635, in test_sss_cache_invalidate_user                                                                                                                                        
    assert sysdb_attrs.get("dataExpireTimestamp") == '1'                                                                                                                                                                                      
AssertionError: assert b'1' == '1'                                                                                                                                                                                                           
 +  where b'1' = <built-in method get of dict object at 0x7ff2ff743708>('dataExpireTimestamp')                                                                                                                                                
 +    where <built-in method get of dict object at 0x7ff2ff743708> = {'dataExpireTimestamp': b'1', 'originalModifyTimestamp': b'20180313115027Z'}.get                                                                                         
______________________________________________________________________________________________________ test_sss_cache_invalidate_group _______________________________________________________________________________________________________
Traceback (most recent call last):                                                                                                                                                                                                            
  File "/home/build/sssd/src/tests/intg/test_ts_cache.py", line 664, in test_sss_cache_invalidate_group                                                                                                                                       
    assert sysdb_attrs.get("dataExpireTimestamp") == '1'                                                                                                                                                                                      
AssertionError: assert b'1' == '1'                                                                                                                                                                                                            
 +  where b'1' = <built-in method get of dict object at 0x7ff2fd11d750>('dataExpireTimestamp')                                                                                                                                                
 +    where <built-in method get of dict object at 0x7ff2fd11d750> = {'dataExpireTimestamp': b'1', 'originalModifyTimestamp': b'20180313115029Z'}.get  

Metadata Update from @sbose:
- Issue assigned to sbose

a year ago

Metadata Update from @sbose:
- Custom field patch adjusted to on

a year ago

Metadata Update from @jhrozek:
- Issue set to the milestone: SSSD 1.16.2
- Issue tagged with: PR

a year ago

Metadata Update from @jhrozek:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata