Exemple #1
0
    def setUp(self):
        """Set up

        make the user that will import
        
        make a list of unique emails to import

        make the imported contacts through a mock importer
        """
        unittest.TestCase.setUp(self)
        self.importing = _make_user()

        self.email1 = _make_names("user1")
        self.email2 = _make_names("user2")
        self.email3 = _make_names("user3")

        self.data_list = [(self.email1, "U Ser1"), (self.email2, "U Ser2"),
                          (self.email3, "U Ser3")]

        self.imported_contacts = []
        with mock.patch(
                "contactstore.openinviter.get_contacts") as mock_importer:
            mock_importer.return_value = self.data_list
            self.imported_contacts = import_contacts(self.importing,
                                                     self.importing.email,
                                                     IMPORTER_PASSWORD)
Exemple #2
0
    def setUp(self):
        """Set up

        make the user that will import
        
        make a list of unique emails to import

        make the imported contacts through a mock importer
        """
        unittest.TestCase.setUp(self)
        self.importing = _make_user()

        self.email1 = _make_names("user1")
        self.email2 = _make_names("user2")
        self.email3 = _make_names("user3")
        
        self.data_list = [
            (self.email1, "U Ser1" ),
            (self.email2, "U Ser2" ),
            (self.email3, "U Ser3" )
            ] 

        self.imported_contacts = []
        with mock.patch("contactstore.openinviter.get_contacts") as mock_importer:
            mock_importer.return_value = self.data_list
            self.imported_contacts = import_contacts(
                self.importing, 
                self.importing.email, 
                IMPORTER_PASSWORD
                )
Exemple #3
0
    def setUp(self):
        unittest.TestCase.setUp(self)
        self.client = Client()
        self.importing = _make_user()

        self.email1 = _make_names("user1")
        self.email2 = _make_names("user2")
        self.email3 = _make_names("user3")

        self.data_list = [(self.email1, "U Ser1"), (self.email2, "U Ser2"),
                          (self.email3, "U Ser3")]
Exemple #4
0
    def setUp(self):
        unittest.TestCase.setUp(self)
        self.client = Client()
        self.importing = _make_user()

        self.email1 = _make_names("user1")
        self.email2 = _make_names("user2")
        self.email3 = _make_names("user3")
        
        self.data_list = [
            (self.email1, "U Ser1" ),
            (self.email2, "U Ser2" ),
            (self.email3, "U Ser3" )
            ]