示例#1
0
文件: test_time.py 项目: UOC/dlkit
 def test_get_type_data_with_celestial(self):
     results = get_type_data('et')
     assert results['identifier'] == 'ET'
     assert results['domain'] == 'Celestial Time Systems'
     assert results['display_name'] == 'Ephemeris Time Type'
     assert results['display_label'] == 'Ephemeris'
     assert results['description'] == 'The time type for Ephemeris time.'
示例#2
0
文件: objects.py 项目: UOC/dlkit
    def get_time_type(self):
        """Gets the time ``Type``.

        return: (osid.type.Type) - the time type
        *compliance: mandatory -- This method must be implemented.*

        """
        return Type(**time.get_type_data(self._time_type_identifier))
示例#3
0
文件: test_time.py 项目: UOC/dlkit
 def test_get_type_data_with_earth(self):
     results = get_type_data('utc')
     assert results['identifier'] == 'UTC'
     assert results['domain'] == 'Earth Time Systems'
     assert results['display_name'] == 'Coordinate Universal Time Type'
     assert results['display_label'] == 'Coordinate Universal'
     assert results[
         'description'] == 'The time type for Coordinate Universal time.'
示例#4
0
    def get_time_type(self):
        """Gets the time ``Type``.

        return: (osid.type.Type) - the time type
        *compliance: mandatory -- This method must be implemented.*

        """
        return Type(**time.get_type_data(self._time_type_identifier))
示例#5
0
文件: test_time.py 项目: UOC/dlkit
 def test_get_type_data_with_fun(self):
     results = get_type_data('colonial')
     assert results['identifier'] == 'COLONIAL'
     assert results['domain'] == 'Alternative Time Systems'
     assert results[
         'display_name'] == 'Colonial, Battlestar Galactica Time Type'
     assert results['display_label'] == 'Colonial, Battlestar Galactica'
     assert results[
         'description'] == 'The time type for Colonial, Battlestar Galactica time.'
示例#6
0
文件: test_time.py 项目: UOC/dlkit
 def test_unknown_type(self):
     with pytest.raises(errors.NotFound):
         get_type_data('foo')