async def test_write_device(): """Test writing device.""" out = io.StringIO() device = apns.ApnsDevice("123", "name", "track_id", True) apns._write_device(out, device) data = yaml.safe_load(out.getvalue()) assert data == { 123: {"name": "name", "tracking_device_id": "track_id", "disabled": True} }
def test_write_device(): """Test writing device.""" out = io.StringIO() device = apns.ApnsDevice('123', 'name', 'track_id', True) apns._write_device(out, device) data = yaml.safe_load(out.getvalue()) assert data == { 123: { 'name': 'name', 'tracking_device_id': 'track_id', 'disabled': True }, }
def test_write_device(): """Test writing device.""" out = io.StringIO() device = apns.ApnsDevice('123', 'name', 'track_id', True) apns._write_device(out, device) data = yaml.load(out.getvalue()) assert data == { 123: { 'name': 'name', 'tracking_device_id': 'track_id', 'disabled': True }, }