@@ -567,7 +567,27 @@ def test_copy_to_non_existing_dir(self):
567
567
)
568
568
569
569
@data_provider (files )
570
- def test_share_with_link (self , file_name ):
570
+ @unittest .skipIf (self .client .get_version () >= (8.2 ),
571
+ "This test should not run against >=8.2 servers" )
572
+ def test_share_with_link_lesser_8_2 (self , file_name ):
573
+ """Test sharing a file with link"""
574
+
575
+ path = self .test_root + file_name
576
+ self .assertTrue (self .client .put_file_contents (path , 'hello world!' ))
577
+
578
+ share_info = self .client .share_file_with_link (path , public_upload = True , password = '1234' )
579
+
580
+ self .assertTrue (self .client .is_shared (path ))
581
+ self .assertTrue (isinstance (share_info , owncloud .ShareInfo ))
582
+ self .assertTrue (type (share_info .get_id ()) is int )
583
+ self .assertEquals (share_info .get_path (), path )
584
+ self .assertTrue (type (share_info .get_link ()) is str )
585
+ self .assertTrue (type (share_info .get_token ()) is str )
586
+
587
+ @data_provider (files )
588
+ @unittest .skipIf (self .client .get_version () < (8.2 ),
589
+ "This test should not run against <8.2 servers" )
590
+ def test_share_with_link_greater_8_2 (self , file_name ):
571
591
"""Test sharing a file with link"""
572
592
573
593
path = self .test_root + file_name
0 commit comments