internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ytdl-org/youtube-dl

Issue:
[https://www.franceinter.fr] WARNING: unable to extract upload date
---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.12.14*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.12.14**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

``` 
youtube-dl-mp3 "https://www.franceinter.fr/emissions/les-concerts-d-inter/les-concerts-d-inter-14-decembre-2017"
[FranceInter] les-concerts-d-inter/les-concerts-d-inter-14-decembre-2017: Downloading webpage
WARNING: unable to extract upload date; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
```

```
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.12.14
[debug] Python version 2.7.12 - Linux-4.4.0-103-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 2.8.11-0ubuntu0.16.04.1, avprobe 2.8.11-0ubuntu0.16.04.1, ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1
[debug] Proxy map: {}
```


Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/franceinter.py b/youtube_dl/extractor/franceinter.py
--- a/youtube_dl/extractor/franceinter.py
+++ b/youtube_dl/extractor/franceinter.py
@@ -33,7 +33,7 @@ def _real_extract(self, url):
         description = self._og_search_description(webpage)
 
         upload_date_str = self._search_regex(
-            r'class=["\']cover-emission-period["\'][^>]*>[^<]+\s+(\d{1,2}\s+[^\s]+\s+\d{4})<',
+            r'class=["\']\s*cover-emission-period\s*["\'][^>]*>[^<]+\s+(\d{1,2}\s+[^\s]+\s+\d{4})<',
             webpage, 'upload date', fatal=False)
         if upload_date_str:
             upload_date_list = upload_date_str.split()


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
Can not download playlist on Youku
### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

`YoukuShowIE` class can extract playlist whose episode count is over than `50`. Here is an video with episode count 26 `youtube-dl` can not download.

```bash
youtube-dl http://list.youku.com/show/id_zefbfbd61237fefbfbdef.html\?spm\=a2h0j.8191423.module_basic_title.5\~A\!2 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'http://list.youku.com/show/id_zefbfbd61237fefbfbdef.html?spm=a2h0j.8191423.module_basic_title.5~A!2', u'-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.12.02
[debug] Python version 2.7.13 - Darwin-17.2.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.3.2, ffprobe 3.3.2
[debug] Proxy map: {}
[youku:show] zefbfbd61237fefbfbdef: Downloading webpage
[youku:show] zefbfbd61237fefbfbdef: Downloading initial playlist data page
[download] Downloading playlist: 虎啸龙吟
[youku:show] playlist 虎啸龙吟: Collected 0 video ids (downloading 0 of them)
[download] Finished downloading playlist: 虎啸龙吟
```
As you see `[youku:show] playlist 虎啸龙吟: Collected 0 video ids (downloading 0 of them)`, so there is a bug. I will fix it and create a PR.


Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/youku.py b/youtube_dl/extractor/youku.py
--- a/youtube_dl/extractor/youku.py
+++ b/youtube_dl/extractor/youku.py
@@ -241,6 +241,10 @@ class YoukuShowIE(InfoExtractor):
         # Ongoing playlist. The initial page is the last one
         'url': 'http://list.youku.com/show/id_za7c275ecd7b411e1a19e.html',
         'only_matching': True,
+    }, {
+        #  No data-id value.
+        'url': 'http://list.youku.com/show/id_zefbfbd61237fefbfbdef.html',
+        'only_matching': True,
     }]
 
     def _extract_entries(self, playlist_data_url, show_id, note, query):
@@ -276,9 +280,9 @@ def _real_extract(self, url):
             r'<div[^>]+id="(reload_\d+)', first_page, 'first page reload id')
         # The first reload_id has the same items as first_page
         reload_ids = re.findall('<li[^>]+data-id="([^"]+)">', first_page)
+        entries.extend(initial_entries)
         for idx, reload_id in enumerate(reload_ids):
             if reload_id == first_page_reload_id:
-                entries.extend(initial_entries)
                 continue
             _, new_entries = self._extract_entries(
                 'http://list.youku.com/show/episode', show_id,


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
[anysex.com] Extractor not working
[AnySex] 352007: Downloading webpage
ERROR: Unable to extract video URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.


Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/anysex.py b/youtube_dl/extractor/anysex.py
deleted file mode 100644
--- a/youtube_dl/extractor/anysex.py
+++ /dev/null
@@ -1,61 +0,0 @@
-from __future__ import unicode_literals
-
-import re
-
-from .common import InfoExtractor
-from ..utils import (
-    parse_duration,
-    int_or_none,
-)
-
-
-class AnySexIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?anysex\.com/(?P<id>\d+)'
-    _TEST = {
-        'url': 'http://anysex.com/156592/',
-        'md5': '023e9fbb7f7987f5529a394c34ad3d3d',
-        'info_dict': {
-            'id': '156592',
-            'ext': 'mp4',
-            'title': 'Busty and sexy blondie in her bikini strips for you',
-            'description': 'md5:de9e418178e2931c10b62966474e1383',
-            'categories': ['Erotic'],
-            'duration': 270,
-            'age_limit': 18,
-        }
-    }
-
-    def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
-        video_id = mobj.group('id')
-
-        webpage = self._download_webpage(url, video_id)
-
-        video_url = self._html_search_regex(r"video_url\s*:\s*'([^']+)'", webpage, 'video URL')
-
-        title = self._html_search_regex(r'<title>(.*?)</title>', webpage, 'title')
-        description = self._html_search_regex(
-            r'<div class="description"[^>]*>([^<]+)</div>', webpage, 'description', fatal=False)
-        thumbnail = self._html_search_regex(
-            r'preview_url\s*:\s*\'(.*?)\'', webpage, 'thumbnail', fatal=False)
-
-        categories = re.findall(
-            r'<a href="http://anysex\.com/categories/[^"]+" title="[^"]*">([^<]+)</a>', webpage)
-
-        duration = parse_duration(self._search_regex(
-            r'<b>Duration:</b> (?:<q itemprop="duration">)?(\d+:\d+)', webpage, 'duration', fatal=False))
-        view_count = int_or_none(self._html_search_regex(
-            r'<b>Views:</b> (\d+)', webpage, 'view count', fatal=False))
-
-        return {
-            'id': video_id,
-            'url': video_url,
-            'ext': 'mp4',
-            'title': title,
-            'description': description,
-            'thumbnail': thumbnail,
-            'categories': categories,
-            'duration': duration,
-            'view_count': view_count,
-            'age_limit': 18,
-        }
diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py
--- a/youtube_dl/extractor/extractors.py
+++ b/youtube_dl/extractor/extractors.py
@@ -39,7 +39,6 @@
 from .americastestkitchen import AmericasTestKitchenIE
 from .animeondemand import AnimeOnDemandIE
 from .anvato import AnvatoIE
-from .anysex import AnySexIE
 from .aol import AolIE
 from .allocine import AllocineIE
 from .aliexpress import AliExpressLiveIE


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
gfycat.com url changes
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2019.04.17**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/ytdl-org/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/ytdl-org/youtube-dl#faq) and [BUGS](https://github.com/ytdl-org/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/ytdl-org/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

gfycat.com has added dashes to some urls [https://gfycat.com/acceptablehappygoluckyharborporpoise-baseball](https://gfycat.com/acceptablehappygoluckyharborporpoise-baseball) causing a HTTP Error. 
This could be fixed by excluding dashes in the url InfoExtractor.




Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/gfycat.py b/youtube_dl/extractor/gfycat.py
--- a/youtube_dl/extractor/gfycat.py
+++ b/youtube_dl/extractor/gfycat.py
@@ -11,7 +11,7 @@
 
 
 class GfycatIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?gfycat\.com/(?:ifr/|gifs/detail/)?(?P<id>[^/?#]+)'
+    _VALID_URL = r'https?://(?:www\.)?gfycat\.com/(?:ifr/|gifs/detail/)?(?P<id>[^-/?#]+)'
     _TESTS = [{
         'url': 'http://gfycat.com/DeadlyDecisiveGermanpinscher',
         'info_dict': {
@@ -47,6 +47,9 @@ class GfycatIE(InfoExtractor):
     }, {
         'url': 'https://gfycat.com/gifs/detail/UnconsciousLankyIvorygull',
         'only_matching': True
+    }, {
+        'url': 'https://gfycat.com/acceptablehappygoluckyharborporpoise-baseball',
+        'only_matching': True
     }]
 
     def _real_extract(self, url):


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
Mixer VODs won't download at all
The tool (latest version being 2019.06.21 at the time of posting this) thinks that the vod link is for downloading a currently online stream.
I think Mixer may have changed its stuff recently. Here is the example below:

Before (when it worked perfectly):
https://mixer.com/streamer?vod=000000000

After (where the problems most likely started at, used on the bottom for references):
https://mixer.com/streamer?vod=IxFno1rqC0S_XJ1a2yGgNw
https://mixer.com/streamer?vod=uODrzy4OOk24ZFYcBGOhdA


Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/beampro.py b/youtube_dl/extractor/beampro.py
--- a/youtube_dl/extractor/beampro.py
+++ b/youtube_dl/extractor/beampro.py
@@ -99,8 +99,8 @@ def manifest_url(kind):
 
 class BeamProVodIE(BeamProBaseIE):
     IE_NAME = 'Mixer:vod'
-    _VALID_URL = r'https?://(?:\w+\.)?(?:beam\.pro|mixer\.com)/[^/?#&]+\?.*?\bvod=(?P<id>\d+)'
-    _TEST = {
+    _VALID_URL = r'https?://(?:\w+\.)?(?:beam\.pro|mixer\.com)/[^/?#&]+\?.*?\bvod=(?P<id>\w+)'
+    _TESTS = [{
         'url': 'https://mixer.com/willow8714?vod=2259830',
         'md5': 'b2431e6e8347dc92ebafb565d368b76b',
         'info_dict': {
@@ -119,7 +119,10 @@ class BeamProVodIE(BeamProBaseIE):
         'params': {
             'skip_download': True,
         },
-    }
+    }, {
+        'url': 'https://mixer.com/streamer?vod=IxFno1rqC0S_XJ1a2yGgNw',
+        'only_matching': True,
+    }]
 
     @staticmethod
     def _extract_format(vod, vod_type):


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
[Mixer] VOD parsing fails
Vods now also include "-" i.e.: https://mixer.com/TheViper?vod=Rh3LY0VAqkGpEQUe2pN-ig

This is not correctly parsed by the `_VALID_URL` regex.


Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/beampro.py b/youtube_dl/extractor/beampro.py
--- a/youtube_dl/extractor/beampro.py
+++ b/youtube_dl/extractor/beampro.py
@@ -99,7 +99,7 @@ def manifest_url(kind):
 
 class BeamProVodIE(BeamProBaseIE):
     IE_NAME = 'Mixer:vod'
-    _VALID_URL = r'https?://(?:\w+\.)?(?:beam\.pro|mixer\.com)/[^/?#&]+\?.*?\bvod=(?P<id>\w+)'
+    _VALID_URL = r'https?://(?:\w+\.)?(?:beam\.pro|mixer\.com)/[^/?#&]+\?.*?\bvod=(?P<id>[^?#&]+)'
     _TESTS = [{
         'url': 'https://mixer.com/willow8714?vod=2259830',
         'md5': 'b2431e6e8347dc92ebafb565d368b76b',
@@ -122,6 +122,9 @@ class BeamProVodIE(BeamProBaseIE):
     }, {
         'url': 'https://mixer.com/streamer?vod=IxFno1rqC0S_XJ1a2yGgNw',
         'only_matching': True,
+    }, {
+        'url': 'https://mixer.com/streamer?vod=Rh3LY0VAqkGpEQUe2pN-ig',
+        'only_matching': True,
     }]
 
     @staticmethod


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
Documentation: --exec does not execute POST download, but POST processing
Thanks for all the work :)
One thing, definitely being picky, but the --exec is documented as executing post download, and that happens if you specify "," (comma) between formats, because there's no merging.
But if there's a "+" (plus) then the exec happens NOT on the fragments (as I would expect) but on the final file, so it doesn't happen post download, but post processing.


Discussion:

Resolving patch:
diff --git a/youtube_dl/options.py b/youtube_dl/options.py
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -853,7 +853,7 @@ def _comma_separated_values_options_callback(option, opt_str, value, parser):
     postproc.add_option(
         '--exec',
         metavar='CMD', dest='exec_cmd',
-        help='Execute a command on the file after downloading, similar to find\'s -exec syntax. Example: --exec \'adb push {} /sdcard/Music/ && rm {}\'')
+        help='Execute a command on the file after downloading and post-processing, similar to find\'s -exec syntax. Example: --exec \'adb push {} /sdcard/Music/ && rm {}\'')
     postproc.add_option(
         '--convert-subs', '--convert-subtitles',
         metavar='FORMAT', dest='convertsubtitles', default=None,


Test patch:
Repository: ytdl-org/youtube-dl

Issue:
youtube extractor fails on age-gated videos
## Checklist
- [X] I'm reporting a broken site support
- [X] I've verified that I'm running youtube-dl version **2020.06.16.1**
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [X] I've searched the bugtracker for similar issues including closed ones


## Verbose log
```
$ youtube-dl -v https://www.youtube.com/watch?v=kWKlmbTudD8
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=kWKlmbTudD8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 2.7.16 (CPython) - Linux-4.19.0-9-amd64-x86_64-with-debian-10.4
[debug] exe versions: ffmpeg 4.1.4-1, ffprobe 4.1.4-1
[debug] Proxy map: {}
[youtube] kWKlmbTudD8: Downloading webpage
ERROR: kWKlmbTudD8: YouTube said: Unable to extract video data
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1893, in _real_extract
    'YouTube said: %s' % unavailable_message, expected=True, video_id=video_id)
ExtractorError: kWKlmbTudD8: YouTube said: Unable to extract video data
```

## Description
The youtube extractor is no longer able to extract age-gated videos.  The above output happens with at least the following URLs.
- https://www.youtube.com/watch?v=kWKlmbTudD8
- https://www.youtube.com/watch?v=x94zXO02VPU


Discussion:
Confirmed by https://github.com/ytdl-org/youtube-dl/issues/25945#issuecomment-656302592
and then probably related to https://github.com/ytdl-org/youtube-dl/issues/25945
and to https://github.com/ytdl-org/youtube-dl/issues/25937

Resolving patch:
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1825,7 +1825,8 @@ def extract_player_response(player_response, video_id):
         # Get video info
         video_info = {}
         embed_webpage = None
-        if re.search(r'player-age-gate-content">', video_webpage) is not None:
+        if (self._og_search_property('restrictions:age', video_webpage, default=None) == '18+'
+                or re.search(r'player-age-gate-content">', video_webpage) is not None):
             age_gate = True
             # We simulate the access to the video from www.youtube.com/v/{video_id}
             # this can be viewed without login into Youtube


Test patch:
Repository: elastic/ecs

Issue:
Honor reusable.top_level: false for generated ES templates
When setting `reusable.top_level: false` the generated Elasticsearch template still includes the field in the template at the top level. I would not expect this field to be included at the top level of the template when this is `false`.


Discussion:
Most "reusable" field sets in ECS are only meant to be used in their nested location (e.g. `source.geo`, `destination.geo`, but not `geo` at the root of a document).

The documentation states this fact correctly, but many of the other generated artifacts still incorrectly declared the fields at the top level. As an example, the sample Elasticsearch templates do have field definitions for `geo` at the root of the document, and they shouldn't.

This issue actually affects the following artifacts:

* Beats file for ECS field definitions
* The sample Elasticsearch templates
* The CSV file
* The intermediate file `ecs_flat.yml`

I will be addressing this bug shortly for the last 3 artifacts.

In Beats, removing these fields may be seen as a breaking change. @andrewkroh or @leehinman could you let me know what your preference is, here? Happy to remove them in the Beats file, if you're confident that they were never used. For now I will leave them in, to avoid any surprises, but let me know if / when you want them removed, and I'll make it so, in this PR or another.

To complete the picture, here's a list of reusable field sets, and whether they are expected at the root of an ECS document (`top_level: true/false` in the YAML), as of ECS 1.5.0:

| reusable field set | expected at root |
| --- | --- |
| `as` | no |
| `code_signature` | no |
| `geo` | no |
| `group` | yes |
| `hash` | no |
| `interface` | no |
| `os` | no |
| `pe` | no |
| `user` | yes |
| `vlan` | no |


Resolving patch:
diff --git a/scripts/generator.py b/scripts/generator.py
--- a/scripts/generator.py
+++ b/scripts/generator.py
@@ -13,6 +13,9 @@
 
 def main():
     args = argument_parser()
+    # Get rid of empty include
+    if args.include and [''] == args.include:
+        args.include.clear()
 
     ecs_version = read_version()
     print('Running generator. ECS version ' + ecs_version)
diff --git a/scripts/schema_reader.py b/scripts/schema_reader.py
--- a/scripts/schema_reader.py
+++ b/scripts/schema_reader.py
@@ -240,7 +240,16 @@ def generate_partially_flattened_fields(fields_nested):
 
 
 def generate_fully_flattened_fields(fields_nested):
-    return flatten_fields(fields_nested, "")
+    flattened = flatten_fields(remove_non_root_reusables(fields_nested), "")
+    return flattened
+
+
+def remove_non_root_reusables(fields_nested):
+    fields = {}
+    for (name, field) in fields_nested.items():
+        if 'reusable' not in field or ('reusable' in field and field['reusable']['top_level']):
+            fields[name] = field
+    return fields
 
 
 def flatten_fields(fields, key_prefix):


Test patch:
Repository: elastic/ecs

Issue:
Support the `value` parameter for `constant_keyword` fields
The [`constant_keyword` data type](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html#constant-keyword-field-type) accepts the `value` parameter. On a `constant_keyword` field if the `value` parameter is specified, that value is used for all documents in the index. Otherwise, it is set based on the first document that gets indexed.

If a user wishes to use the ECS tooling to manage their ES index templates, they may also wish to control the value of `value` via their custom field definitions.

Example definition:

```yaml
  - name: acme
    title: acme
    group: 2
    short: Fields describing acme-related needs.
    description: >
      Acme-related needs
    fields:
      - name: stream
        description: stream
        level: extended
        type: constant_keyword
        value: widgets
```


Discussion:

Resolving patch:
diff --git a/scripts/generators/es_template.py b/scripts/generators/es_template.py
--- a/scripts/generators/es_template.py
+++ b/scripts/generators/es_template.py
@@ -57,6 +57,8 @@ def entry_for(field):
 
         if field['type'] == 'keyword':
             ecs_helpers.dict_copy_existing_keys(field, field_entry, ['ignore_above'])
+        elif field['type'] == 'constant_keyword':
+            ecs_helpers.dict_copy_existing_keys(field, field_entry, ['value'])
         elif field['type'] == 'text':
             ecs_helpers.dict_copy_existing_keys(field, field_entry, ['norms'])
         elif field['type'] == 'alias':


Test patch:
diff --git a/scripts/tests/test_es_template.py b/scripts/tests/test_es_template.py
--- a/scripts/tests/test_es_template.py
+++ b/scripts/tests/test_es_template.py
@@ -135,6 +135,28 @@ def test_entry_for_scaled_float(self):
         }
         self.assertEqual(es_template.entry_for(test_map), exp)
 
+    def test_constant_keyword_with_value(self):
+        test_map = {
+            'name': 'field_with_value',
+            'type': 'constant_keyword',
+            'value': 'foo'
+        }
+
+        exp = {
+            'type': 'constant_keyword',
+            'value': 'foo'
+        }
+        self.assertEqual(es_template.entry_for(test_map), exp)
+
+    def test_constant_keyword_no_value(self):
+        test_map = {
+            'name': 'field_without_value',
+            'type': 'constant_keyword'
+        }
+
+        exp = {'type': 'constant_keyword'}
+        self.assertEqual(es_template.entry_for(test_map), exp)
+
 
 if __name__ == '__main__':
     unittest.main()