def testTimestampValues(self, input_value): self.assertEquals( extra_types.JsonValue(string_value=input_value), util.ConvertJsonValueForScalarTypes('TIMESTAMP', input_value))
def testDateValues(self, input_value): self.assertEquals( extra_types.JsonValue(string_value=input_value), util.ConvertJsonValueForScalarTypes('DATE', input_value))
def testFloat64ValuesWithLetter(self, input_value): self.assertEquals( extra_types.JsonValue(string_value=input_value), util.ConvertJsonValueForScalarTypes('FLOAT64', input_value))
def testFloat64ValuesWithNumber(self, input_value, expected_value): self.assertEquals( extra_types.JsonValue(double_value=expected_value), util.ConvertJsonValueForScalarTypes('FLOAT64', input_value))
def testBoolValues(self, input_value, expected_value): self.assertEquals( extra_types.JsonValue(boolean_value=expected_value), util.ConvertJsonValueForScalarTypes('BOOL', input_value))
def testNullValues(self, scalar_type): self.assertEquals( extra_types.JsonValue(is_null=True), util.ConvertJsonValueForScalarTypes(scalar_type, 'NULL'))
def testNumericValues(self, input_value): self.assertEqual( extra_types.JsonValue(string_value=input_value), util.ConvertJsonValueForScalarTypes('NUMERIC', input_value))