예제 #1
0
    def __init__(self, pipeline):
        """Initializes a new job.

        Args:
            pipeline: beam.Pipeline. The pipeline that manages the job.
        """
        self.pipeline = pipeline
        self.datastoreio_stub = stub_io.DatastoreioStub()
예제 #2
0
    def test_valid_datastoreio_value(self):
        obj = stub_io.DatastoreioStub()

        self.assertIs(obj, job_options.validate_datastoreio_stub(obj))
예제 #3
0
    def test_overwritten_values(self):
        datastoreio_stub = stub_io.DatastoreioStub()

        options = job_options.JobOptions(datastoreio_stub=datastoreio_stub)

        self.assertIs(options.datastoreio_stub, datastoreio_stub)
예제 #4
0
 def setUp(self):
     super(NdbIoTests, self).setUp()
     self.datastoreio_stub = stub_io.DatastoreioStub()
예제 #5
0
 def setUp(self):
     super(PutResultsTests, self).setUp()
     self.datastoreio_stub = stub_io.DatastoreioStub()
     with python_utils.ExitStack() as exit_stack:
         exit_stack.enter_context(self.datastoreio_stub.context())
         self.exit_stack = exit_stack.pop_all()
예제 #6
0
 def setUp(self):
     super(DatastoreioStubTests, self).setUp()
     self.stub = stub_io.DatastoreioStub()