def test_get_public_directory(self):
        """Tests for get_public_directory."""
        dir_dao = self.vgw.change_public_access(
            self.dir.id, True, allow_directory=True)
        self.assertIsNotNone(dir_dao.public_uuid)
        public_key = dir_dao.public_key
        # If I don't do this, the test fails
        # lock the user
        StorageUser.objects.filter(id=self.user1.id).update(locked=True)
        # Once a directory has been made public, it can be accessed
        dir2 = self.gw.get_public_directory(public_key)
        self.assertEqual(dir2.id, self.dir.id)