'Test the get_last_oplog_timestamp method'

def test_get_last_oplog_timestamp(self):

    self.init_dbs()
    self.reset_opman(['includedb1.*', 'includedb2.includecol1'], [], {})
    self.opman.oplog = self.primary_conn['local']['oplog.rs']
    for i in range(1000):
        self.primary_conn['includedb1']['includecol1'].insert_one({'idb1col1': (i + 500)})
    oplog = self.primary_conn['local']['oplog.rs']
    oplog = oplog.find({'op': {'$ne': 'n'}}).sort('$natural', pymongo.DESCENDING).limit((-1))[0]
    self.assertEqual(self.opman.get_last_oplog_timestamp(), oplog['ts'])
