def test_timestring_thu_1_july_2004_22_30_00(self):
     self.assertItemsEqual(bigquery_type("Thu, 1 July 2004 22:30:00"),
                           'timestamp')
 def test_list_is_invalid_type(self):
     bigquery_type([1, 2, 3])
 def test_isoformat_timestring(self):
     self.assertItemsEqual(bigquery_type(datetime.now().isoformat()),
                           'timestamp')
 def test_timestring_thu_1_july_2004_22_30_00(self):
     self.assertItemsEqual(bigquery_type("Thu, 1 July 2004 22:30:00"),
                           'timestamp')
 def test_timestring_arbitrary_fn_fail(self):
     self.assertItemsEqual(
         bigquery_type("February 20th 1973",
                       timestamp_parser=lambda x: False),
         'string')
 def test_list_is_invalid_type(self):
     self.assertIsNone(bigquery_type([1, 2, 3]))
 def test_int_is_integer(self):
     self.assertItemsEqual(bigquery_type(123), 'integer')
Beispiel #8
0
 def test_timestring_feb_20_1973(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
Beispiel #9
0
 def test_timestring_thu_1_july_2004_22_30_00(self):
     six.assertCountEqual(self, bigquery_type("Thu, 1 July 2004 22:30:00"),
                          'timestamp')
Beispiel #10
0
 def test_datetime_is_timestamp(self):
     six.assertCountEqual(self, bigquery_type(datetime.now()), 'timestamp')
Beispiel #11
0
 def test_isoformat_timestring(self):
     six.assertCountEqual(self, bigquery_type(datetime.now().isoformat()),
                          'timestamp')
Beispiel #12
0
 def test_int_is_integer(self):
     six.assertCountEqual(self, bigquery_type(123), 'integer')
Beispiel #13
0
 def test_unicode_is_string(self):
     six.assertCountEqual(self,
                          bigquery_type(u"Here is a happy face \u263A"),
                          'string')
Beispiel #14
0
 def test_str_is_string(self):
     six.assertCountEqual(self, bigquery_type("Bob"), 'string')
 def test_timestring_next_thursday(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
Beispiel #16
0
 def test_today_is_not_timestring(self):
     six.assertCountEqual(self, bigquery_type("today"), 'string')
 def test_timestring_arbitrary_fn_fail(self):
     self.assertItemsEqual(
         bigquery_type("February 20th 1973",
                       timestamp_parser=lambda x: False), 'string')
Beispiel #18
0
 def test_timestring_next_thursday(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
 def test_str_is_string(self):
     self.assertItemsEqual(bigquery_type("Bob"), 'string')
Beispiel #20
0
 def test_timestring_arbitrary_fn_success(self):
     six.assertCountEqual(
         self, bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
 def test_isoformat_timestring(self):
     self.assertItemsEqual(bigquery_type(datetime.now().isoformat()),
                           'timestamp')
Beispiel #22
0
 def test_dict_is_record(self):
     six.assertCountEqual(self, bigquery_type({"a": 1}), 'record')
 def test_timestring_next_thursday(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
 def test_str_is_string(self):
     six.assertCountEqual(self, bigquery_type("Bob"), 'string')
 def test_list_is_invalid_type(self):
     self.assertIsNone(bigquery_type([1, 2, 3]))
 def test_unicode_is_string(self):
     six.assertCountEqual(self, bigquery_type(u"Here is a happy face \u263A"),
                          'string')
 def test_datetime_is_timestamp(self):
     self.assertItemsEqual(bigquery_type(datetime.now()), 'timestamp')
 def test_int_is_integer(self):
     six.assertCountEqual(self, bigquery_type(123), 'integer')
 def test_timestring_feb_20_1973(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
 def test_datetime_is_timestamp(self):
     six.assertCountEqual(self, bigquery_type(datetime.now()), 'timestamp')
 def test_today_is_not_timestring(self):
     self.assertItemsEqual(bigquery_type("today"), 'string')
 def test_isoformat_timestring(self):
     six.assertCountEqual(self, bigquery_type(datetime.now().isoformat()),
                          'timestamp')
 def test_timestring_arbitrary_fn_success(self):
     self.assertItemsEqual(
         bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
 def test_timestring_feb_20_1973(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        self.assertIsNone(bigquery_type(SomeClass()))
 def test_timestring_thu_1_july_2004_22_30_00(self):
     six.assertCountEqual(self, bigquery_type("Thu, 1 July 2004 22:30:00"),
                          'timestamp')
 def test_dict_is_record(self):
     self.assertItemsEqual(bigquery_type({"a": 1}), 'record')
 def test_today_is_not_timestring(self):
     six.assertCountEqual(self, bigquery_type("today"), 'string')
 def test_unicode_is_string(self):
     self.assertItemsEqual(bigquery_type(u"Here is a happy face \u263A"),
                           'string')
 def test_timestring_next_thursday(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"), 'timestamp')
 def test_datetime_is_timestamp(self):
     self.assertItemsEqual(bigquery_type(datetime.now()), 'timestamp')
 def test_timestring_arbitrary_fn_success(self):
     six.assertCountEqual(
         self, bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
 def test_timestring_feb_20_1973(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
 def test_dict_is_record(self):
     six.assertCountEqual(self, bigquery_type({"a": 1}), 'record')
 def test_today_is_not_timestring(self):
     self.assertItemsEqual(bigquery_type("today"), 'string')
 def test_str_is_string(self):
     self.assertItemsEqual(bigquery_type("Bob"), 'string')
 def test_timestring_arbitrary_fn_success(self):
     self.assertItemsEqual(
         bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
 def test_unicode_is_string(self):
     self.assertItemsEqual(bigquery_type(u"Here is a happy face \u263A"),
                           'string')
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        self.assertIsNone(bigquery_type(SomeClass()))
 def test_int_is_integer(self):
     self.assertItemsEqual(bigquery_type(123), 'integer')
 def test_dict_is_record(self):
     self.assertItemsEqual(bigquery_type({"a": 1}), 'record')
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        bigquery_type(SomeClass())