def test_attrs_to_server(self): values = {'tags': ['foo', 'bar'], 'timestamp': iso8601.parse_date('2015-04-15 12:00:00+0300'), 'ignored1': 'just a string', 'ignored2': 123} out = utils.attrs_to_server(values) assert out['tags'] == 'foo,bar' assert out['timestamp'] == '2015-04-15T15:00:00.000000Z' assert out['ignored1'] == 'just a string' assert out['ignored2'] == 123
def to_server(cls, values): return attrs_to_server(values)