File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -708,15 +708,17 @@ def test_multiple_gist_dirs_on_gist_create(self):
708
708
709
709
assert_equal (2 , Directory .objects .filter (name = Document2 .GIST_DIR , type = 'directory' ).count ())
710
710
711
+ # get_gist_directory merges all duplicate gist directories into one
711
712
response = self ._create_gist (
712
713
statement = 'SELECT 12345' ,
713
714
doc_type = 'hive-query' ,
714
715
name = 'test_gist_create' ,
715
716
)
716
- gist_parent_dir = Document2 .objects .get (type = 'gist' , name = 'test_gist_create' ).parent_directory
717
+ gist_uuid = json .loads (response .content )['uuid' ]
718
+ gist_parent_uuid = Document2 .objects .get (uuid = gist_uuid ).parent_directory .uuid
717
719
718
720
assert_equal (1 , Directory .objects .filter (name = Document2 .GIST_DIR , type = 'directory' ).count ())
719
- assert_true (Directory .objects .filter (name = Document2 .GIST_DIR , type = 'directory' , uuid = gist_parent_dir . uuid ).exists ())
721
+ assert_true (Directory .objects .filter (name = Document2 .GIST_DIR , type = 'directory' , uuid = gist_parent_uuid ).exists ())
720
722
721
723
722
724
def test_get (self ):
You can’t perform that action at this time.
0 commit comments