1 |
import dbsException
|
2 |
import dbsPrimaryDataset
|
3 |
import testCaseInterface
|
4 |
# Unit testing.
|
5 |
|
6 |
|
7 |
class testCreatePrimaryDS(testCaseInterface.testCaseInterface) :
|
8 |
|
9 |
def __init__(self):
|
10 |
funcName = "%s.%s" % (self.__class__.__name__, "__init__()")
|
11 |
print "Now executing ", funcName
|
12 |
testCaseInterface.testCaseInterface.__init__(self)
|
13 |
self.addTestCase(self.createPrimaryDS)
|
14 |
#self.addTestCase(self.printYahoo)
|
15 |
|
16 |
def createPrimaryDS(self):
|
17 |
funcName = "%s.%s" % (self.__class__.__name__, "createPrimaryDS")
|
18 |
print "Now executing ", funcName
|
19 |
|
20 |
try:
|
21 |
|
22 |
dataset = dbsPrimaryDataset.DbsPrimaryDataset(datasetName="ThisIsATestDataset")
|
23 |
|
24 |
primaryDatasetId = self.api.createPrimaryDataset(dataset)
|
25 |
print "Got primary dataset id: %s" % primaryDatasetId
|
26 |
|
27 |
except dbsException.DbsException, ex:
|
28 |
return 1
|
29 |
|
30 |
return 0
|
31 |
|
32 |
def printYahoo(self) :
|
33 |
print "YAhooooooooooooooooooooooooo"
|
34 |
return 0
|
35 |
|
36 |
|