remove merge_taglists as AWS will only take submitted tags or tags from db but not both when creating snapshot

This commit is contained in:
Jon Beilke 2018-09-21 13:28:13 -05:00
commit 7daee905a5
4 changed files with 10 additions and 43 deletions

View file

@ -3,7 +3,7 @@ from __future__ import unicode_literals
import sure # noqa
from freezegun import freeze_time
from moto.core.utils import camelcase_to_underscores, underscores_to_camelcase, unix_time, merge_taglists
from moto.core.utils import camelcase_to_underscores, underscores_to_camelcase, unix_time
def test_camelcase_to_underscores():
@ -28,28 +28,3 @@ def test_underscores_to_camelcase():
@freeze_time("2015-01-01 12:00:00")
def test_unix_time():
unix_time().should.equal(1420113600.0)
def test_merge_taglists():
taglist_a = [
{
'Key': 'foo',
'Value': 'bar',
},
{
'Key': 'foo1',
'Value': 'bar1',
},
]
taglist_b = [
{
'Key': 'foo1',
'Value': 'bar1b',
},
]
taglist_merged = merge_taglists(taglist_a, taglist_b)
len(taglist_merged).should.equal(2)
tag_foo = [t for t in taglist_merged if t['Key']=='foo']
tag_foo1 = [t for t in taglist_merged if t['Key']=='foo1']
tag_foo[0].should.equal({'Key': 'foo','Value': 'bar',})
tag_foo1[0].should.equal({'Key': 'foo1','Value': 'bar1b',})