1 |
afaq |
1.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 |
|
|
testCaseInterface.testCaseInterface.__init__(self)
|
11 |
|
|
self.addTestCase(self.createPrimaryDS)
|
12 |
|
|
#self.addTestCase(self.printYahoo)
|
13 |
|
|
|
14 |
|
|
def createPrimaryDS(self):
|
15 |
|
|
funcName = "%s.%s" % (self.__class__.__name__, "createPrimaryDS")
|
16 |
|
|
print "Now executing ", funcName
|
17 |
|
|
|
18 |
|
|
try:
|
19 |
|
|
|
20 |
|
|
dataset = dbsPrimaryDataset.DbsPrimaryDataset(datasetName="ThisIsATestDataset")
|
21 |
|
|
|
22 |
|
|
primaryDatasetId = self.api.createPrimaryDataset(dataset)
|
23 |
|
|
print "Got primary dataset id: %s" % primaryDatasetId
|
24 |
|
|
|
25 |
|
|
except dbsException.DbsException, ex:
|
26 |
|
|
return 1
|
27 |
|
|
|
28 |
|
|
return 0
|
29 |
|
|
|
30 |
|
|
def printYahoo(self) :
|
31 |
|
|
print "YAhooooooooooooooooooooooooo"
|
32 |
|
|
return 0
|
33 |
|
|
|
34 |
|
|
|